group(function () { Route::get('group/form/{element}', 'GroupAPIController@form'); Route::resource('group', 'GroupAPIController'); }); // 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 media Route::prefix('{guard}/medium')->group(function () { Route::get('group/form/{element}', 'GroupAPIController@form'); Route::apiResource('group', 'GroupAPIController'); }); // Public routes for media Route::get('medium/Group', 'GroupPublicController@getGroup'); } ); } // API routes for contact Route::prefix('{guard}/medium')->group(function () { Route::get('contact/form/{element}', 'ContactAPIController@form'); Route::resource('contact', 'ContactAPIController'); }); // 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 media Route::prefix('{guard}/medium')->group(function () { Route::get('contact/form/{element}', 'ContactAPIController@form'); Route::apiResource('contact', 'ContactAPIController'); }); // Public routes for media Route::get('medium/Contact', 'ContactPublicController@getContact'); } ); } // API routes for media Route::prefix('{guard}/medium')->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 variant Route::prefix('{guard}/medium')->group(function () { Route::get('variant/form/{element}', 'VariantAPIController@form'); Route::resource('variant', 'VariantAPIController'); }); // 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 media Route::prefix('{guard}/medium')->group(function () { Route::get('variant/form/{element}', 'VariantAPIController@form'); Route::apiResource('variant', 'VariantAPIController'); }); // Public routes for media Route::get('medium/Variant', 'VariantPublicController@getVariant'); } ); }