group(function () { Route::resource('faq', 'FaqResourceController'); }); 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', 'FaqResourceController'); }); // Public routes for pages Route::get('faqs/', 'FaqPublicController@index'); Route::get('faqs/{slug?}', 'FaqPublicController@show'); } ); } // web routes for categories Route::prefix('{guard}/faq')->group(function () { Route::resource('categories', 'CategoriesResourceController'); }); 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', 'CategoriesResourceController'); }); // Public routes for pages Route::get('faqs/', 'CategoriesPublicController@index'); Route::get('faqs/{slug?}', 'CategoriesPublicController@show'); } ); }