Closed kevince09 closed 1 year ago
@kevince09 I think the asset()
method usually points to the public folder within your Laravel application. So, use of '/vendor/datatables/js/jquery.dataTables.min.js'
will be alright. You can check source code at https://github.com/jeroennoten/Laravel-AdminLTE/blob/master/resources/views/master.blade.php as a reference, there vendor
is prepended to all urls when using the asset()
method.
Okay, i just misunderstood the asset()
and the example from wiki after all. I thought it will points to public/vendor by default (or when using this package) and assume the default code is like this :
<script src="{{ asset('jquery/jquery.min.js') }}"></script>
<script src="{{ asset('bootstrap/js/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('overlayScrollbars/js/jquery.overlayScrollbars.min.js') }}"></script>
But i forgot that, of course you can place css folder directly under public directory, and vendor is just another directory like css from the example.
Thank you @dfsmania
I just installed Datatables Plugins and use this config :
Here is my test blade code :
As it mentions on https://github.com/jeroennoten/Laravel-AdminLTE/wiki/Plugins-Configuration, when you use asset=>True the css & script location will be using laravel asset(), but it does not work on my case.
On my page, it generates :
When it should be :
I have not changed my project ASSET_URL, because the other css & script is generated correctly like this :
So, am i using this config wrong, if so how to use this config properly ? Of course i can just use the exact path on the location like this
'/vendor/datatables/js/jquery.dataTables.min.js'
, but i think if i can use the config as it mentions on the wiki, it will be better.