I stumbled upon: Asset::add('xlsupdates', 'js/xlsupdates.js'); a static call to add assets, but I'm not sure if that's done anymore in Laravel 4, might be a Laravel 3 thing, can't find it anywhere in the vendor directory.
Trying to do the same thing, for slightly different reasons, at a loss
Looks like I was right, this might help put you in the right direction: http://stackoverflow.com/questions/14205404/laravel-4-what-is-the-replacement-for-assetadd
In Laravel 4 you can do something like this (assuming using blade)
{{ asset('link/to/path/in/public/folder/datatables.js') }}
If you are not using the Data Tables on every page it would be best to do a per page kind of thing. The way I find best to do that is add a
@section('pageScripts')
just below the global assets. Then call it like this:
@yield('pageScripts')
{{ asset('link/to/path/in/public/folder/datatables.js') }}
@stop
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community