group(function () { Route::get('media/form/{element}', 'MediaAPIController@form'); Route::resource('media', 'MediaAPIController'); }); // 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 media Route::prefix('{guard}/medium')->group(function () { Route::get('media/form/{element}', 'MediaAPIController@form'); Route::apiResource('media', 'MediaAPIController'); }); // Public routes for media Route::get('medium/Media', 'MediaPublicController@getMedia'); } ); } // API routes for brand Route::prefix('{guard}/medium')->group(function () { Route::get('brand/form/{element}', 'BrandAPIController@form'); Route::resource('brand', 'BrandAPIController'); }); // 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 media Route::prefix('{guard}/medium')->group(function () { Route::get('brand/form/{element}', 'BrandAPIController@form'); Route::apiResource('brand', 'BrandAPIController'); }); // Public routes for media Route::get('medium/Brand', 'BrandPublicController@getBrand'); } ); } // API routes for media_tag Route::prefix('{guard}/medium')->group(function () { Route::get('media_tag/form/{element}', 'MediaTagAPIController@form'); Route::resource('media_tag', 'MediaTagAPIController'); }); // 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 media Route::prefix('{guard}/medium')->group(function () { Route::get('media_tag/form/{element}', 'MediaTagAPIController@form'); Route::apiResource('media_tag', 'MediaTagAPIController'); }); // Public routes for media Route::get('medium/MediaTag', 'MediaTagPublicController@getMediaTag'); } ); } // API routes for media_topic Route::prefix('{guard}/medium')->group(function () { Route::get('media_topic/form/{element}', 'MediaTopicAPIController@form'); Route::resource('media_topic', 'MediaTopicAPIController'); }); // 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 media Route::prefix('{guard}/medium')->group(function () { Route::get('media_topic/form/{element}', 'MediaTopicAPIController@form'); Route::apiResource('media_topic', 'MediaTopicAPIController'); }); // Public routes for media Route::get('medium/MediaTopic', 'MediaTopicPublicController@getMediaTopic'); } ); } // API routes for target_group Route::prefix('{guard}/medium')->group(function () { Route::get('target_group/form/{element}', 'TargetGroupAPIController@form'); Route::resource('target_group', 'TargetGroupAPIController'); }); // 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 media Route::prefix('{guard}/medium')->group(function () { Route::get('target_group/form/{element}', 'TargetGroupAPIController@form'); Route::apiResource('target_group', 'TargetGroupAPIController'); }); // Public routes for media Route::get('medium/TargetGroup', 'TargetGroupPublicController@getTargetGroup'); } ); } // API routes for media_detail Route::prefix('{guard}/medium')->group(function () { Route::get('media_detail/form/{element}', 'MediaDetailAPIController@form'); Route::resource('media_detail', 'MediaDetailAPIController'); }); // 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 media Route::prefix('{guard}/medium')->group(function () { Route::get('media_detail/form/{element}', 'MediaDetailAPIController@form'); Route::apiResource('media_detail', 'MediaDetailAPIController'); }); // Public routes for media Route::get('medium/MediaDetail', 'MediaDetailPublicController@getMediaDetail'); } ); } // API routes for media_detail_category Route::prefix('{guard}/medium')->group(function () { Route::get('media_detail_category/form/{element}', 'MediaDetailCategoryAPIController@form'); Route::resource('media_detail_category', 'MediaDetailCategoryAPIController'); }); // 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 media Route::prefix('{guard}/medium')->group(function () { Route::get('media_detail_category/form/{element}', 'MediaDetailCategoryAPIController@form'); Route::apiResource('media_detail_category', 'MediaDetailCategoryAPIController'); }); // Public routes for media Route::get('medium/MediaDetailCategory', 'MediaDetailCategoryPublicController@getMediaDetailCategory'); } ); }