Support the ongoing development of Laravel.io →
posted 10 years ago
Views
Last updated 2 years ago.
0

Since you namespaced your controller it is looking for a View class in your namespace.

On the top of your controller you can add


Use View;

Or look for the class in the global scope by using a backslash.


\View::make('backend.dashboard.index');

Last updated 2 years ago.
0

Well you don't have to use namespace in your routes at all. controllers folder is already defined as autoload/classmap in composer.json

This will work and you won't mind the scope:

Route::get('admin', 'DashboardController@showWelcome');

Do not forget composer dump-auto

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ntanas72 ntanas72 Joined 12 Jun 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.

© 2024 Laravel.io - All rights reserved.