group(function () { Route::resource('group', 'GroupResourceController'); }); // Public routes for group Route::get('media/', 'GroupPublicController@index'); Route::get('media/{slug?}', 'GroupPublicController@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', 'GroupResourceController'); }); // Public routes for pages Route::get('media/', 'GroupPublicController@index'); Route::get('media/{slug?}', 'GroupPublicController@show'); } ); } // web routes for contact Route::prefix('{guard}/medium')->group(function () { Route::resource('contact', 'ContactResourceController'); }); // Public routes for contact Route::get('media/', 'ContactPublicController@index'); Route::get('media/{slug?}', 'ContactPublicController@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', 'ContactResourceController'); }); // Public routes for pages Route::get('media/', 'ContactPublicController@index'); Route::get('media/{slug?}', 'ContactPublicController@show'); } ); } // web routes for media Route::prefix('{guard}/medium')->group(function () { Route::resource('media', 'MediaResourceController'); }); // Public routes for media Route::get('media/', 'MediaPublicController@index'); Route::get('media/{slug?}', 'MediaPublicController@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', 'MediaResourceController'); }); // Public routes for pages Route::get('media/', 'MediaPublicController@index'); Route::get('media/{slug?}', 'MediaPublicController@show'); } ); } // web routes for variant Route::prefix('{guard}/medium')->group(function () { Route::resource('variant', 'VariantResourceController'); }); // Public routes for variant Route::get('media/', 'VariantPublicController@index'); Route::get('media/{slug?}', 'VariantPublicController@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', 'VariantResourceController'); }); // Public routes for pages Route::get('media/', 'VariantPublicController@index'); Route::get('media/{slug?}', 'VariantPublicController@show'); } ); }