Laravel 5 - Does Assets::add() Still Work?
beardedbrew opened this issue · comments
Tim Myers commented
Referencing Assets::add() in a controller returns the following error in L5.
Class 'App\Http\Controllers\Assets' not found
Tim Myers commented
Actually calling
\Assets::add();
fixed the issue.
Javi 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.