Laravel mendapatkan nilai parameter URL dalam pengontrol
// url : https://www.example.com/param1/param2/param3
$request()->segment(3); // param3
JérômeW
// url : https://www.example.com/param1/param2/param3
$request()->segment(3); // param3
public function update($name)
{
User::where('name', $name)->first();
return view('test')->with('user', $user);
}