Answers for "how to get url parameter in laravel blade"

PHP
4

how to get variable from url in laravel

request('variable')
Posted by: Guest on April-04-2021
0

get url parameters in laravel blade

/** resources/my_view.blade.php */

{{ request()->id }}
Posted by: Guest on September-08-2021
0

laravel url with parameters blade

url('path') . '?' . http_build_query(['param1' => 'value', 'param2' => 'value']);
Posted by: Guest on April-10-2021
1

laravel get url parameters in controller

public function update($name)
{
    User::where('name', $name)->first();
    return view('test')->with('user', $user);
}
Posted by: Guest on February-22-2021
-1

how to get the url parameter in blade laravel

Route::get('/posts/{post}/comments/{comment}', function ($postId, $commentId) {
    return view('name of the view')->with('postId',$postId);
});
Posted by: Guest on June-19-2021

Code answers related to "how to get url parameter in laravel blade"

Browse Popular Code Answers by Language