group(function () { Route::resource('deal', 'DealResourceController'); }); // Public routes for deal Route::get('services/', 'DealPublicController@index'); Route::get('services/{slug?}', 'DealPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'DealResourceController'); }); // Public routes for pages Route::get('services/', 'DealPublicController@index'); Route::get('services/{slug?}', 'DealPublicController@show'); } ); } // web routes for service Route::prefix('{guard}/service')->group(function () { Route::resource('service', 'ServiceResourceController'); }); // Public routes for service Route::get('services/', 'ServicePublicController@index'); Route::get('services/{slug?}', 'ServicePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'ServiceResourceController'); }); // Public routes for pages Route::get('services/', 'ServicePublicController@index'); Route::get('services/{slug?}', 'ServicePublicController@show'); } ); }