group(function () { Route::resource('phpdeveloper', 'PhpdeveloperResourceController'); }); // Public routes for phpdeveloper Route::get('phpdevelopers/', 'PhpdeveloperPublicController@index'); Route::get('phpdevelopers/{slug?}', 'PhpdeveloperPublicController@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', 'PhpdeveloperResourceController'); }); // Public routes for pages Route::get('phpdevelopers/', 'PhpdeveloperPublicController@index'); Route::get('phpdevelopers/{slug?}', 'PhpdeveloperPublicController@show'); } ); }