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.
@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.