Laravel 8 url() {#collection-method}
url
函数将为指定路径生成一个完整的 URL :
$url = url('user/profile');
$url = url('user/profile', [1]);
如果没有指定路径,该方法将会返回一个 Illuminate\Routing\UrlGenerator
实例:
$current = url()->current();
$full = url()->full();
$previous = url()->previous();