Support the ongoing development of Laravel.io →
posted 8 years ago
Session
Last updated 1 year ago.
0

Try putting the full namespace with the route.

Route::resource('customer','App\Modules\Customer\Controllers\CustomerController@index');
0

Thanks for reply

but It is not working

I have try both below Code but not working My route file path is-> \app\Modules\Customer\routes.php

Route::group(array('module'=>'Customer','namespace' => 'App\Modules\Customer\Controllers'), function() { Route::resource('customer/add-customer','\App\Modules\Customer\Controllers\CustomerController@index'); });

and

Route::group(array('module'=>'Customer'), function() { Route::resource('customer/add-customer','\App\Modules\Customer\Controllers\CustomerController@index'); });

But I put in root routes.php it is working fine. It is not working from my custom module routes.php

$this->middleware('auth');

Last updated 8 years ago.
0

Thanks,

It is working I have Add "'middleware'=>'web'" and work fine

Route::group(array('middleware'=>'web','module'=>'Customer','namespace' => 'App\Modules\Customer\Controllers'), function() {

Route::resource('customer','CustomerController@index');

});

0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.