What are the steps to upgrade to Bootstrap 4 in Laravel 5.5?

I am looking to transition to Bootstrap 4 in Laravel 5.5,

Previously, I ran:

composer require laravelnews/laravel-twbs4

However, I encountered layout issues in my "auth view" so I tried this:

php artisan preset bootstrap4-auth

Unfortunately, the problems persist in my auth view. How can I resolve this?

Answer â„–1

Below are the steps to install Bootstrap 4 in Laravel 5.5:

If you want to use Bootstrap 4 (BS4), which is currently in beta, follow these instructions:

  • Execute

    npm install <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="086a67677c7b7c7a6978483c26382638256a6d7c69">[email protected]</a> --save-dev
    to update/install the latest version

  • Replace require('bootstrap-sass') with require('bootstrap') in your bootstrap.js file

  • Change

    @import "~bootstrap-sass/assets/stylesheets/bootstrap"; 
    

    to

    @import "~bootstrap/scss/bootstrap";
    

    in your app.scss file. Don't forget to remove any references to variables as they won't work with BS4

  • Run npm run dev in the terminal to generate the .css and .js files

Note that pre-existing auth templates may need adjustment due to new class names in BS4, or refer to this link

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Include a link in the email body without displaying the URL

My concern revolves around displaying a shortened text instead of the full link within an email. When the recipient clicks on "Open Link," they should be redirected to the URL specified. The text "Open Link" must appear in bold. My current development fram ...

How can I set random background images on my Wordpress site?

I am currently using WP version 3.5.1 along with a twenty twelve child theme and PHP 5.2 on my server. I have been attempting to implement a php script (which has successfully worked on my other websites) to display random background images, however, it se ...

The items in the footer are not all aligned on a single line

Trying to create a footer with two linked images, I used justify-content: center, but it seems to be centering the images from the start rather than their actual centers. This causes them to appear slightly off to the left. Additionally, the images are sta ...

How can I prevent the div from occupying space using CSS?

Below is the CSS that I am currently using. I am a beginner when it comes to CSS. I want to add a property to the CSS that will make the div take up only the necessary width, not more. For example, even if the text within the div is short (like "hi"), se ...

Retrieve isolated scope of directive from transcluded content

I am not certain if it is possible, but I am essentially looking for a reverse version of the '&' isolate scope in AngularJS. You can check out this Plunkr to see an example. In essence, I have created a custom directive that provides some r ...

Modifying the ng-model value causes updates in the other sections of the list as well

I am currently working on a view that displays a list of results to the user. The user can click on a hyperlink in the view to modify a specific record. However, I am encountering an issue where changing the value of a dropdown for one employee is affectin ...

Issue with displaying Bootstrap 3 dropdown menus

I've been experimenting with the latest Bootstrap 3 and everything seems to be working well, except for the dropdowns I'm trying to create. Please let me know if anyone has any insights into what I might be doing incorrectly. Here is the code I&a ...

Tips for creating editable SVGs without the need for inline SVG code

I am looking to incorporate SVG icons into my websites, but I have concerns about using <image> which limits the ability to modify SVG properties (such as changing fill color on hover). I have come across the concept of in-line SVG, which appears to ...

What is the jquery method for applying css to a disabled checkbox element?

Hey there! I'm trying to disable a checkbox first, and then add a CSS property. I've come up with the code below. The checkbox gets disabled, but unfortunately, the CSS property isn't added. $("input:radio,input:checkbox").each( funct ...

Implement a validation check within a text box by utilizing JQuery

I am attempting to insert a validation symbol (a green check mark) inside a text box once a user fulfills specific criteria. My approach involves using JQuery for implementation. I have made an attempt using Fontawesome icons with the following code, but i ...

Adjust the <div> element to dynamically resize based on the user's browser changes

I need a div to adjust its width and height dynamically based on the browser dimensions when a user resizes their browser window. Implemented code following the provided suggestions: <!DOCTYPE html> <html> <head> <link rel="s ...

Ensure that the tables are HTML5 compliant by setting the cellpadding attribute for only specific tables, without

Perhaps I'm being a bit fussy. I'm looking to add cell padding to certain tables but not others, without having to manually edit each individual td element. I prefer to keep it HTML5 compliant, which means avoiding the cellpadding property of the ...

Bootstrap 5 Hamburger Icon Toggler for Navigation Menu

After opening the code, I am unable to close it properly. I need to find the solution to this issue. Can someone identify what is causing this problem? <nav class="navbar navbar-expand-lg navbar-light bg-light"> <div class="co ...

When a block is clicked, jQuery will reveal that block while hiding the others sequentially, starting with the second block, then the third, and finally the fourth

Creating a navigation menu with 4 blocks can be a bit tricky, especially when trying to show one block at a time upon click. Here is my code attempt, but unfortunately it's not working as expected. I would greatly appreciate any help or suggestions on ...

Error: The function $.simpleTicker is not defined

Every time I try to call a jQuery function, an error shows up: Uncaught TypeError: $.simpleTicker is not a function I attempted changing $ to jQuery but it didn't resolve the issue. This represents my jQuery code: (function ($) { 'use ...

Automatically trigger a page reload using a jQuery function

Currently facing an issue with jQuery. I created a drop-down menu and would like it to expand when the li tag within the menu is clicked. Even though I am using the jQuery click function successfully, there seems to be a problem where the webpage refreshe ...

Adjust the size of the title font and modify the background colors

One of my titles looks like this: <a title="I am your title"/> The default background color is yellow Take a look at this image which can help illustrate what I'm asking about Is there any way to change the background color and increase the ...

Having trouble retrieving data from the fetch database. The login page seems to be stuck in a continuous loop and won't let me

Every time I attempt to log in through: webhost/adminlogin.php, I am redirected back to the same page. Did I forget to add something? Thank you for your assistance. Here is my script: This is what is included in my adminlogin.php file: <?php session ...

Retrieving information from an alternative tag with Beautifulsoup

I need to extract specific HTML code using Python. Here is my current Python code: soup = ''' <p> <strong> abc </strong> </p> <ul> <l ...

I am having trouble grasping the concept of how the find method operates in

I am new to using jquery. I have created a table in HTML below: https://i.sstatic.net/6Odg3.png My goal was to display three alert boxes consecutively for 3 checkboxes found in my table. Here is the code I used: $(document).ready(function(){ $("#but ...