So Using Shhetri and Using Namespaces in Laravel 4
I did like this:
namespace App\Controllers\Shops; class BShopsController extends ShopsController{}
Also in routes.php you need to change to this:
Route::controller('shops', 'App\Controllers\Shops\ShopsController');
And where is the call method () - should also use the namespace.
Also need to run
composer dump-autoload -o
otherwise there were errors.
Also in ShopsContrller you need:
use \App\Controllers\BaseController;
Because the store controller was in a different namespace than BaseController, and cannot find it. But extends from BaseController, so it needs to.
Darius.V Jan 09 '15 at 7:10 2015-01-09 07:10
source share