env('APP_HOST'), 'prefix' => 'admin/inviteCode', 'middleware' => 'permission'],function(){ Route::get('index', 'InviteCodesController@index')->name('admin.inviteCode.index'); Route::post('index', 'InviteCodesController@index')->name('admin.inviteCode.ajax.index'); Route::get('store','InviteCodesController@store')->name('admin.inviteCode.store'); Route::post('store','InviteCodesController@store')->name('admin.inviteCode.save'); Route::post('destroy/{id?}','InviteCodesController@destroy')->name('admin.inviteCode.destroy'); Route::post('destroys','InviteCodesController@destroys')->name('admin.inviteCode.destroys'); Route::get('edit/{id?}','InviteCodesController@edit')->name('admin.inviteCode.edit'); Route::post('update/{id?}','InviteCodesController@update')->name('admin.inviteCode.update'); }); Route::group(['domain' => env('APP_HOST_WEB'), 'prefix' => 'inviteCode'],function (){ Route::post('list', 'Front\\InviteCodesController@index'); });