Skip to content

Instantly share code, notes, and snippets.

@hamid-ne
Last active July 8, 2021 19:12
Show Gist options
  • Save hamid-ne/d852074b3afbd95d8f8ee681ea69bbaf to your computer and use it in GitHub Desktop.
Save hamid-ne/d852074b3afbd95d8f8ee681ea69bbaf to your computer and use it in GitHub Desktop.
Install Boostrap 4 RTL for Laravel

Install Boostrap 4 RTL for Laravel

  1. npm uninstall --save-dev bootstrap-sass

  2. npm install --save-dev rtl-bootstrap popper.js

  3. Find In 'resources/assets/js/bootstrap.js' and Replace

try {
    window.$ = window.jQuery = require('jquery');

    require('bootstrap-sass');
} catch (e) {}
try {
    window.$ = window.jQuery = require('jquery');
    window.Popper = require('popper.js');

    require('rtl-bootstrap');
} catch (e) {}
  1. Find In 'resources/assets/sass/app.scss' and Replace
// Fonts
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");

// Variables
@import "variables";

// Bootstrap
@import "~bootstrap-sass/assets/stylesheets/bootstrap";
// Fonts
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");

// Variables
@import "variables";

// Bootstrap
@import "~rtl-bootstrap/scss/bootstrap";
  1. Find And Delete line in 'resources/assets/sass/_variables.scss'
$font-size-base: 14px;
  1. Run npm install

  2. Run npm run dev or npm run production or npm run watch

  3. Enjoy and use Bootstrap4 RTL

Auther: Hamid Nasr Website

@shaho1090
Copy link

آقا دستت درد نکنه واقعا به داد من رسید

@bardiamazaheri
Copy link

Thanks a Lot

@amindeist
Copy link

مرسی عالی بود

@mehrang13
Copy link

npm i bootstrap-v4-rtl

@abbashajihashemi
Copy link

Thanks a lot for sharing this and solved my problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment