Level 88
You don't have to use curl since Laravel has the information as well for you. You can for example use
// In your controller
public function index(Request $request)
{
$request->header('User-Agent');
}
You can also access this information somewhere else using the request helper or facade
request()->header('User-Agent');
Request::header('User-Agent');