group(function () { Route::resource('tutorial', 'TutorialResourceController'); }); // Public routes for tutorial Route::get('tutorials/', 'TutorialPublicController@index'); Route::get('tutorials/{slug?}', 'TutorialPublicController@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', 'TutorialResourceController'); }); // Public routes for pages Route::get('tutorials/', 'TutorialPublicController@index'); Route::get('tutorials/{slug?}', 'TutorialPublicController@show'); } ); } // web routes for tutorialcategory Route::prefix('{guard}/tutorial')->group(function () { Route::resource('tutorialcategory', 'TutorialcategoryResourceController'); }); // Public routes for tutorialcategory Route::get('tutorials/', 'TutorialcategoryPublicController@index'); Route::get('tutorials/{slug?}', 'TutorialcategoryPublicController@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', 'TutorialcategoryResourceController'); }); // Public routes for pages Route::get('tutorials/', 'TutorialcategoryPublicController@index'); Route::get('tutorials/{slug?}', 'TutorialcategoryPublicController@show'); } ); } // web routes for tutorialtag Route::prefix('{guard}/tutorial')->group(function () { Route::resource('tutorialtag', 'TutorialtagResourceController'); }); // Public routes for tutorialtag Route::get('tutorials/', 'TutorialtagPublicController@index'); Route::get('tutorials/{slug?}', 'TutorialtagPublicController@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', 'TutorialtagResourceController'); }); // Public routes for pages Route::get('tutorials/', 'TutorialtagPublicController@index'); Route::get('tutorials/{slug?}', 'TutorialtagPublicController@show'); } ); }