laravel get the current requested url

$currentURL = url()->current();

dd($currentURL);

laravel get current url in controller, laravel get current url in view, get current url in laravel 5.2, laravel 5.2 get current url, get current page url in laravel 5, get current url laravel

BETA Snippet explanation automatically generated by OpenAI:

Here is what the above code is doing:
1. It is checking to see if the user is logged in.
2. If the user is logged in then the code will load the profile page, if not then it will redirect the user to the login page.
3. If the user is logged in then it will redirect the

Snippet By Tony Lea

·

Created October 20th, 2021

·

Report Snippet