Try putting the full namespace with the route.
Route::resource('customer','App\Modules\Customer\Controllers\CustomerController@index');
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');
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');
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community