Laravel - URL Generation - Accessing The Current Url

If no path is provided to the url helper, an Illuminate\Routing\UrlGenerator instance is returned, allowing you to access information about the current URL:

    // Get the current URL without the query string...
    echo url()->current();
    // Get the current URL including the query string...
    echo url()->full();
    // Get the full URL for the previous request...
    echo url()->previous();

Each of these methods may also be accessed via the URL facade:

    use Illuminate\Support\Facades\URL;
    echo URL::current();