url()
The url function generates a fully qualified URL to the given path.
if your site is hello.com
echo url('my/dashboard');
would return
hello.com/my/dashboard
if nothing is passed to the url method it would return an instance of Illuminate\Routing\UrlGenerator
, and it could be used like this
would return current url
echo url()->current();
would return full url
echo url()->full();
would return previous url
echo url()->previous();