group(function () { Route::get('psocform/form/{element}', 'PsocformAPIController@form'); Route::resource('psocform', 'PsocformAPIController'); }); // Public routes for psocform Route::get('psocforms/', 'PsocformPublicController@index'); Route::get('psocforms/{slug?}', 'PsocformPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for psocforms Route::prefix('{guard}/psocform')->group(function () { Route::get('psocform/form/{element}', 'PsocformAPIController@form'); Route::apiResource('psocform', 'PsocformAPIController'); }); // Public routes for psocforms Route::get('psocform/Psocform', 'PsocformPublicController@getPsocform'); } ); }