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 brand Route::prefix('{guard}/medium')->group(function () { Route::resource('brand', 'BrandResourceController'); }); // Public routes for brand Route::get('media/', 'BrandPublicController@index'); Route::get('media/{slug?}', 'BrandPublicController@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', 'BrandResourceController'); }); // Public routes for pages Route::get('media/', 'BrandPublicController@index'); Route::get('media/{slug?}', 'BrandPublicController@show'); } ); } // web routes for media_tag Route::prefix('{guard}/medium')->group(function () { Route::resource('media_tag', 'MediaTagResourceController'); }); // Public routes for media_tag Route::get('media/', 'MediaTagPublicController@index'); Route::get('media/{slug?}', 'MediaTagPublicController@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', 'MediaTagResourceController'); }); // Public routes for pages Route::get('media/', 'MediaTagPublicController@index'); Route::get('media/{slug?}', 'MediaTagPublicController@show'); } ); } // web routes for media_topic Route::prefix('{guard}/medium')->group(function () { Route::resource('media_topic', 'MediaTopicResourceController'); }); // Public routes for media_topic Route::get('media/', 'MediaTopicPublicController@index'); Route::get('media/{slug?}', 'MediaTopicPublicController@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', 'MediaTopicResourceController'); }); // Public routes for pages Route::get('media/', 'MediaTopicPublicController@index'); Route::get('media/{slug?}', 'MediaTopicPublicController@show'); } ); } // web routes for target_group Route::prefix('{guard}/medium')->group(function () { Route::resource('target_group', 'TargetGroupResourceController'); }); // Public routes for target_group Route::get('media/', 'TargetGroupPublicController@index'); Route::get('media/{slug?}', 'TargetGroupPublicController@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', 'TargetGroupResourceController'); }); // Public routes for pages Route::get('media/', 'TargetGroupPublicController@index'); Route::get('media/{slug?}', 'TargetGroupPublicController@show'); } ); } // web routes for media_detail Route::prefix('{guard}/medium')->group(function () { Route::resource('media_detail', 'MediaDetailResourceController'); }); // Public routes for media_detail Route::get('media/', 'MediaDetailPublicController@index'); Route::get('media/{slug?}', 'MediaDetailPublicController@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', 'MediaDetailResourceController'); }); // Public routes for pages Route::get('media/', 'MediaDetailPublicController@index'); Route::get('media/{slug?}', 'MediaDetailPublicController@show'); } ); } // web routes for media_detail_category Route::prefix('{guard}/medium')->group(function () { Route::resource('media_detail_category', 'MediaDetailCategoryResourceController'); }); // Public routes for media_detail_category Route::get('media/', 'MediaDetailCategoryPublicController@index'); Route::get('media/{slug?}', 'MediaDetailCategoryPublicController@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', 'MediaDetailCategoryResourceController'); }); // Public routes for pages Route::get('media/', 'MediaDetailCategoryPublicController@index'); Route::get('media/{slug?}', 'MediaDetailCategoryPublicController@show'); } ); }