Closed stoneC0der closed 2 years ago
Hi @stoneC0der , if you look at the master.php file, then you can see plugins are not included from configuration file when enabling Laravel Mix, instead unique compiled files are included. I believe you should include plugins on the Mix configuration in these cases, but I'm not familiarized with Mix in order to help you. Check issue #490 for some more details.
Hi @Shidersz, thanks this how I solved it:
Extend the adminlte::page from layout/dashboard.blade.php in my case (or app.blade.php)
add this
@extends('adminlte::page') @push('css') {{-- Configured CSS --}} @include('adminlte::plugins', ['type' => 'css']) @endpush @push('js') {{-- Configured Scripts --}} @include('adminlte::plugins', ['type' => 'js']) @endpush
Then extend all your view from the dashboard or app template
Environment
Complete the next environment information.
I am currently using the package with laravel mix to compile the assets, everything work so far, I have always use custom code for almost everything but now I am trying to follow the package directive/implementation.
I got Toastr woring when directly including the cdn in the layout template extended from admin::page but when I configure the plugin in conf/adminlte.php the assets are not being injected nor the cdn links My guess is,it is proabably because I am using laravel_mix so how to I fix that please
After installing the plugin the assets were publish in /public/vendor/toastr folder
Setup
I created a separate js file for adminlte like so ressources/assets/js/admin/app.js content:
ressources/assets/sass/admin-css.scss content:
Webpack.mix
plugin setting: