80744/how-to-get-current-path-of-request-with-its-query-parameters
Is there a Laravel way to get the current path of a Request with its query parameters?
For instance, for the URL:
http://www.example.com/one/two?key=value
Request::getPathInfo() would return /one/two.
Request::url() would return http://www.example.com/one/two.
The desired output is /one/two?key=value.
Hello @kartik,
Try to use the following:
\Request::getRequestUri()
Hope this helps!! Thank you!!
Hello @kartik, Use merge(): $request->merge([ 'user_id' => ...READ MORE
Hello @kartik, The simplest way is just to ...READ MORE
Hello, Route::getRoutes() returns a RouteCollection. On each element, you can ...READ MORE
Hey @kartik, First you have to go to ...READ MORE
Named route is used to give specific ...READ MORE
Hello, This is simple you just need to ...READ MORE
Hey @kartik, Named routing is another amazing feature of ...READ MORE
Hello, To create both of the created_at and updated_at columns: $t->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP')); $t->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP on update ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.