group(function () { Route::resource('subscribe_content', 'SubscribeContentResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'SubscribeContentResourceController'); }); // Public routes for pages Route::get('subscribe_contents/', 'SubscribeContentPublicController@index'); Route::get('subscribe_contents/{slug?}', 'SubscribeContentPublicController@show'); } ); }