Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Bootstrap 4 upgrade in laravel 5.5

Introduction

Hello Friends,
In this article I will describe how to create a Laravel 5.5 application from scratch and also I am going to describe how you can upgrade from default Bootstrap 3 to Bootstrap 4.

I. Creating a Laravel 5.5 application from scratch

Step 1: Let’s create a new Laravel 5.5 App from scratch using command:
composer create-project laravel/laravel5.5app "5.5.*" --prefer-dist

As we can see It has created a laravel5.5app directory and installed all the Laravel specific dependencies.

Go to directory path using command cd laravel5.5app

Step 2: run command composer install to create a composer folder under \laravel5.5app\vendor with all required dependencies

Step 3: Creating node module with all required node dependencies using command npm install

As we can see there is not any node_module folder in my project directory. Once we run npm install it will create node module folder with all required node packages.

All node packages has been installed successfully. Now check your project directory whether node_module folder created or not.

Yeh, its created Right…….!

Step 4: Now our project is ready to run over server. Use command php artisan serve to run the project and hit Enter button.

Boom.. Guys our laravel5.5app project is up and running on localhost:8000

Step 5: Open your browser and hit url http://localhost:8000/ and your application is ready.

II. Steps to upgrade from default Bootstrap 3 to Bootstrap 4.

Step 1: Open Code editor and import the created laravel5.5app project directory into it. (Here i am using visual studio IDE)

As we know laravel application uses public folder to use css and javascript. So open public/css/app.css to check the default version of Bootstrap. Here it shows v3.3.7. Now our target is to upgrade it to latest version which is 4.4.1

Step 2: To download latest version of bootstrap package in node_module folder in project directory run npm install bootstrap@4.4.1 or npm i bootstrap@4.4.1

we can see a bootstrap package with version 4 in laravel5.5app/node_module has been created.

Step 3: Open resources/assets/sass/app.scss

replace the import of older path with new path of bootstrap.scss as: @import "~bootstrap/scss/bootstrap.scss"; I have commented line no. 9 and wrote line no. 10 with latest import of bootstrap 4.

Step 4: Open resources/assets/sass/_variables.scss convert 'px' to 'rem'(because ‘px’ unit is incompatible in bootstrap 4). Here 14px = 0.875rem.

Refer: laravel5.5app\resources\assets\sass\_variables.scss

Step 5: run npm run dev to exicute webpack.mix.js file.

This File will Compile 'resources/assets/js/app.js', and make a copy in 'public/js' and also Compile 'resources/assets/sass/app.scss', and make a copy with .css extension in 'public/css'

Step 6: Repeat 1st step and check the version of Bootstrap in public/css/app.css .

Boom…., It is upgraded to Bootstrap v4..4.1

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
MotoShare.in is your go-to platform for adventure and exploration. Rent premium bikes for epic journeys or simple scooters for your daily errands—all with the MotoShare.in advantage of affordability and ease.

Related Posts

What is Laravel and use cases of Laravel?

What is Laravel? Laravel is an open-source, free PHP web framework designed for the development of web applications following the model-view-controller (MVC) architectural pattern. It was generated…

Read More

Complete guide of Laravel certification courses, tutorials & training

What is Laravel Laravel is a reliable and simple to use open-source PHP framework. It adheres to the model-view-controller pattern of design. Laravel makes use of pre-existing…

Read More

Top 100 laravel interview questions and answers

1) What is Laravel? Laravel is an open-source widely used PHP framework. The platform was intended for the development of web application by using MVC architectural pattern….

Read More

[SOLVED] Laravel : Supervisor FATAL/BACKOFF Exited too quickly (process log may have details)

Problem I’m trying to use Laravel queues with a supervisor but the service is not working properly. When I try to check status:$ sudo supervisorctl status$ laravel-worker:laravel-worker_00:…

Read More

How to Login with Token in Laravel PHP Framework?

How to Login with Token in Laravel PHP Framework? Step 1. Create a new Project, so write down the following command on Git Bash: Step 2. Move…

Read More

Directory Structure Of Laravel Application

devopsschool – This is Project Folder app – The app directory contains the core code of your application. bootstrap – The bootstrap directory contains the app.php file…

Read More