JavaScript & CSS Scaffolding | laravel bootstrap vue
IntroductionWhileLaraveldoesnotdictatewhichJavaScriptorCSSpre-processorsyouuse,itdoesprovideabasicstartingpointusingBootstrap[1],React[2],and/orVue[3]thatwillbehelpfulformanyapplications.Bydefault,LaravelusesNPM[4]toinstallbothofthesefrontendpackages.TheBootstrapandVuescaffoldingprovidedbyLaravelislocatedinthelaravel/uiComposerpackage,whichmaybeinstalledusingComposer:composerrequirelaravel/ui:2.4Oncethelaravel/uipackagehasbeeninstalled,youmayinstallthefrontendscaffoldingusingtheuiArtisancomm...
IntroductionWhile Laravel does not dictate which JavaScript or CSS pre-processors you use, it does provide a basic starting point using Bootstrap[1], React[2], and / or Vue[3] that will be helpful for many applications. By default, Laravel uses NPM[4] to install both of these frontend packages.
The Bootstrap and Vue scaffolding provided by Laravel is located in the laravel/ui Composer package, which may be installed using Composer:
composer require laravel/ui:2.4
Once the laravel/ui package has been installed, you may install the frontend scaffolding using the ui Artisan command:
// Generate basic scaffolding...
php artisan ui bootstrap
php artisan ui vue
php artisan ui react
// Generate login / registration scaffolding...
php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth
CSSLaravel Mix[5] provides a clean, expressive API over compiling SASS or Less, whic...