group(function () { Route::get('subscribe_content/form/{element}', 'SubscribeContentAPIController@form'); Route::resource('subscribe_content', 'SubscribeContentAPIController'); }); // Public routes for subscribe_content Route::get('subscribe_contents/', 'SubscribeContentPublicController@index'); Route::get('subscribe_contents/{slug?}', 'SubscribeContentPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for subscribe_contents Route::prefix('{guard}/subscribe_content')->group(function () { Route::get('subscribe_content/form/{element}', 'SubscribeContentAPIController@form'); Route::apiResource('subscribe_content', 'SubscribeContentAPIController'); }); // Public routes for subscribe_contents Route::get('subscribe_content/SubscribeContent', 'SubscribeContentPublicController@getSubscribeContent'); } ); }