How can you retrieve requested path in Laravel.
You can retrieve requested path in controller by using path() method of Laravel Request class. Below is sample uses
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class DemoController extends Controller{
public function index(Request $request){
$requested_path=$request->path();
}
}
No comments