url
laravel/framework
The
url
function generates a fully qualified URL to the given path:
$url
=
url
(
'user/profile'
);
$url
=
url
(
'user/profile'
, [
1
]);
return
call_user_func
(static::
$createUrlCallback
,
$notifiable
,
$this
->
token
);
}
return
url
(
route
(
'password.reset'
, [
'token'
=>
$this
->
token
,
'email'
=>
$notifiable
->
getEmailForPasswordReset
(),
],
false
));
}
src/Illuminate/Auth/Notifications/ResetPassword.php
protected function
invalid
(
$request
,
ValidationException $exception
)
{
return
redirect
(
$exception
->
redirectTo
??
url
()->
previous
())
->
withInput
(
Arr
::
except
(
$request
->
input
(),
$this
->
dontFlash
))
->
withErrors
(
$exception
->
errors
(),
$request
->
input
(
'_error_bag'
,
$exception
->
errorBag
));
}
src/Illuminate/Foundation/Exceptions/Handler.php
function
secure_url
(
$path
,
$parameters
= [])
{
return
url
(
$path
,
$parameters
,
true
);
}
}
src/Illuminate/Foundation/helpers.php
$uri
=
substr
(
$uri
,
1
);
}
return
trim
(
url
(
$uri
),
'/'
);
}
src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
'title'
=>
'Test Title'
,
]));
$this
->
assertSame
(
'http://localhost/post/5'
,
url
(
'/post'
,
$post
));
}
public function
testNamedRoutesAreUrlRoutable
()
tests/Integration/Http/ResourceTest.php