'web', 'prefix' => 'message', 'namespace' => 'Modules\Message\Http\Controllers'], function() { }); Route::middleware(['auth:api'])->group(function () { Route::group(['prefix' => 'message', 'namespace' => 'Modules\Message\Http\Controllers'], function(){ Route::get('/show','MessageController@show'); Route::post('/store','MessageController@store'); Route::post('/delete','MessageController@destroy'); Route::post('/list','MessageController@list'); }); });