group(function () { Route::resource('post', 'PostResourceController'); }); 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', 'PostResourceController'); }); // Public routes for pages Route::get('channels/', 'PostPublicController@index'); Route::get('channels/{slug?}', 'PostPublicController@show'); } ); } // web routes for channel Route::prefix('{guard}/channel')->group(function () { Route::resource('channel', 'ChannelResourceController'); }); 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', 'ChannelResourceController'); }); // Public routes for pages Route::get('channels/', 'ChannelPublicController@index'); Route::get('channels/{slug?}', 'ChannelPublicController@show'); } ); }