group(function () { Route::resource('task', 'TaskResourceController'); }); // Public routes for task Route::get('tasks/', 'TaskPublicController@index'); Route::get('tasks/{slug?}', 'TaskPublicController@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', 'TaskResourceController'); }); // Public routes for pages Route::get('tasks/', 'TaskPublicController@index'); Route::get('tasks/{slug?}', 'TaskPublicController@show'); } ); } // web routes for tasktype Route::prefix('{guard}/task')->group(function () { Route::resource('tasktype', 'TasktypeResourceController'); }); // Public routes for tasktype Route::get('tasks/', 'TasktypePublicController@index'); Route::get('tasks/{slug?}', 'TasktypePublicController@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', 'TasktypeResourceController'); }); // Public routes for pages Route::get('tasks/', 'TasktypePublicController@index'); Route::get('tasks/{slug?}', 'TasktypePublicController@show'); } ); }