group(function () { Route::get('website/form/{element}', 'WebsiteAPIController@form'); Route::resource('website', 'WebsiteAPIController'); }); // Public routes for website Route::get('websites/', 'WebsitePublicController@index'); Route::get('websites/{slug?}', 'WebsitePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for websites Route::prefix('{guard}/website')->group(function () { Route::get('website/form/{element}', 'WebsiteAPIController@form'); Route::apiResource('website', 'WebsiteAPIController'); }); // Public routes for websites Route::get('website/Website', 'WebsitePublicController@getWebsite'); } ); }