Stolz / Assets

An ultra-simple-to-use assets management library for PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel 5 - Does Assets::add() Still Work?

beardedbrew opened this issue · comments

Referencing Assets::add() in a controller returns the following error in L5.
Class 'App\Http\Controllers\Assets' not found

Actually calling
\Assets::add();
fixed the issue.

commented

@beardedbrew Larave 5 introduces namespaces for controllers so you should use \Assets::add(), or simply add use Assets; after the declaration of your controller namespace.