| Other Configuration |
|---|
| Laravel Mix |
| Laravel Vite |
| Livewire |
Laravel Mix
IMPORTANT
Please, be sure you're familiar with Laravel Mix before changing or using this configuration.
If you want to use Laravel Mix to compile assets and plugins into single files instead of publishing all the assets and plugins files in the /public/vendor folder, start by installing the following NPM packages:
npm i @fortawesome/fontawesome-free
npm i icheck-bootstrap
npm i overlayscrollbarsNow, add the following to your bootstrap.js file after window.$ = window.jQuery = require('jquery');:
require('overlayscrollbars');
require('bootstrap');
require('../../vendor/almasaeed2010/adminlte/dist/js/adminlte');Also, replace your app.scss content by the following:
// Fonts
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic');
@import '~@fortawesome/fontawesome-free/css/all.css';
// OverlayScrollbars
@import '~overlayscrollbars/css/OverlayScrollbars.css';
// iCheck
@import '~icheck-bootstrap/icheck-bootstrap.css';
// AdminLTE
@import '../../vendor/almasaeed2010/adminlte/dist/css/adminlte.css';
// Bootstrap
// Already imported by AdminLTE
//@import '~bootstrap/scss/bootstrap';Laravel Mix config before v3.14.0
After preparing the Laravel Mix vendor files, set the enabled_laravel_mix configuration option to true to enable the load of css/app.css & js/app.js files that are located in the public folder.
enabled_laravel_mixEnables Laravel Mix specific
css/jsload in master layout.
Also, you can change the paths used to lookup for the compiled JS and CSS files using the next configuration options.
laravel_mix_css_pathPath (including file name) to the compiled
CSSfile. This path should be relative to the public folder. Default value iscss/app.csslaravel_mix_js_pathPath (including file name) to the compiled
JSfile. This path should be relative to the public folder. Default value isjs/app.js
Laravel Mix config after v3.14.0
For backward compatibility, we still support the old Laravel Mix configuration in newest version, however we recommend migrating to the new one as explained below.
To use Laravel Mix assets bundling tool after v3.14.0, set the laravel_asset_bundling configuration option to 'mix' to enable the load of css/app.css & js/app.js files that are located in the public folder.
Also, you can change the paths used to lookup for the compiled JS and CSS files using the next configuration options.
laravel_css_pathPath (including file name) to the compiled
CSSfile. This path should be relative to the public folder. Default value iscss/app.csslaravel_js_pathPath (including file name) to the compiled
JSfile. This path should be relative to the public folder. Default value isjs/app.js
Laravel Vite
IMPORTANT
Please, be sure you're familiar with Laravel Vite before changing or using this configuration.
IMPORTANT
Native support to Laravel Vite was added on version v3.14.0, so avoid using the options explained below on old package versions.
To use the Laravel Vite assets bundling tool with this package, set the laravel_asset_bundling configuration option to 'vite' or 'vite-js-only' (if you expect to import your CSS via JavaScript) to enable the load of your bundled assets in the master layout.
Also, you can change the paths used to lookup for the bundled JS and CSS files using the next configuration options.
laravel_css_pathPath (including file name) to the bundled
CSSfile. This path should be relative to the root folder. Default value isresources/css/app.cssif the configuration option does not exists.laravel_js_pathPath (including file name) to the bundled
JSfile. This path should be relative to the root folder. Default value isresources/js/app.jsif the configuration option does not exists.
Livewire
IMPORTANT
Please, be sure you're familiar with Livewire before changing or using this configuration.
This option provides support to the Livewire package. Before enabling livewire support, you must install the livewire package using composer:
composer require livewire/livewireAfter that, just enable livewire support in the configuration file:
/*
|--------------------------------------------------------------------------
| Livewire configuration
|--------------------------------------------------------------------------
|
| Here we can modify the livewire configuration.
|
*/
'livewire' => true,This will setup the @livewireStyles and the @livewireScripts directives correctly on the master.blade.php blade file of this package, as explained on the Livewire Documentation.