group(function () { Route::get('distributionarea/form/{element}', 'DistributionareaAPIController@form'); Route::resource('distributionarea', 'DistributionareaAPIController'); }); // Public routes for distributionarea Route::get('masters/', 'DistributionareaPublicController@index'); Route::get('masters/{slug?}', 'DistributionareaPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for masters Route::prefix('{guard}/master')->group(function () { Route::get('distributionarea/form/{element}', 'DistributionareaAPIController@form'); Route::apiResource('distributionarea', 'DistributionareaAPIController'); }); // Public routes for masters Route::get('master/Distributionarea', 'DistributionareaPublicController@getDistributionarea'); } ); } // API routes for targetgroup Route::prefix('{guard}/master')->group(function () { Route::get('targetgroup/form/{element}', 'TargetgroupAPIController@form'); Route::resource('targetgroup', 'TargetgroupAPIController'); }); // Public routes for targetgroup Route::get('masters/', 'TargetgroupPublicController@index'); Route::get('masters/{slug?}', 'TargetgroupPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for masters Route::prefix('{guard}/master')->group(function () { Route::get('targetgroup/form/{element}', 'TargetgroupAPIController@form'); Route::apiResource('targetgroup', 'TargetgroupAPIController'); }); // Public routes for masters Route::get('master/Targetgroup', 'TargetgroupPublicController@getTargetgroup'); } ); } // API routes for linkinfo Route::prefix('{guard}/master')->group(function () { Route::get('linkinfo/form/{element}', 'LinkinfoAPIController@form'); Route::resource('linkinfo', 'LinkinfoAPIController'); }); // Public routes for linkinfo Route::get('masters/', 'LinkinfoPublicController@index'); Route::get('masters/{slug?}', 'LinkinfoPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for masters Route::prefix('{guard}/master')->group(function () { Route::get('linkinfo/form/{element}', 'LinkinfoAPIController@form'); Route::apiResource('linkinfo', 'LinkinfoAPIController'); }); // Public routes for masters Route::get('master/Linkinfo', 'LinkinfoPublicController@getLinkinfo'); } ); } // API routes for status Route::prefix('{guard}/master')->group(function () { Route::get('status/form/{element}', 'StatusAPIController@form'); Route::resource('status', 'StatusAPIController'); }); // Public routes for status Route::get('masters/', 'StatusPublicController@index'); Route::get('masters/{slug?}', 'StatusPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for masters Route::prefix('{guard}/master')->group(function () { Route::get('status/form/{element}', 'StatusAPIController@form'); Route::apiResource('status', 'StatusAPIController'); }); // Public routes for masters Route::get('master/Status', 'StatusPublicController@getStatus'); } ); } // API routes for mediatype Route::prefix('{guard}/master')->group(function () { Route::get('mediatype/form/{element}', 'MediatypeAPIController@form'); Route::resource('mediatype', 'MediatypeAPIController'); }); // Public routes for mediatype Route::get('masters/', 'MediatypePublicController@index'); Route::get('masters/{slug?}', 'MediatypePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for masters Route::prefix('{guard}/master')->group(function () { Route::get('mediatype/form/{element}', 'MediatypeAPIController@form'); Route::apiResource('mediatype', 'MediatypeAPIController'); }); // Public routes for masters Route::get('master/Mediatype', 'MediatypePublicController@getMediatype'); } ); }