Support the ongoing development of Laravel.io →
posted 11 years ago
Packages

I installed stolz/assets as an alternative to Basset. I followed the install and config instructions in the readme.

"Installation

In your Laravel base directory run

composer require "stolz/assets:dev-master"

Then edit app/config/app.php and add the service provider within the providers array

'providers' => array( ... 'Stolz\Assets\ManagerServiceProvider'

There is no need to add the Facade, the package will add it for you."

Although it says that the facade will be registered by the package, it does not appear to be registered.

I included the link generators

{{ Assets::css() }}
{{ Assets::js() }}

in my .blade templates but they failed to generate the css and js links.

The other question is in regards to the 'autoload' => array(). I edited it to read

 'autoload' => array('css','js'),

I'm not sure what I'm not doing or doing wrong. Any help would be appreciated.

Last updated 2 years ago.
0

Hi ChefBrett.

The facade is automatically added by the Service Provider. It's binded to the IoC container so don't expect to see a line referencing the facade withing the config/app.php ;). Anyway, if you already used the link generation functions that means it's been properly added.

If you don't add any asset with the add() function before calling the link generation functions is normal they don't generate anything.

The line 'autoload' => array('css','js'), will not have any effect unless you have previously defined two collections named 'css' and 'js'. Note every asset you add that has no extension is supposed to be a collection.

I hope I was helpful.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ChefBrett chefbrett Joined 21 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.