Use Laravel's helper function Arr::get when accessing the 'email' key in the $user array.
This prevents PHP from throwing an "Undefined index" error when trying to access the 'email' key that doesn't exist in the array. Valid in the case where the email is not a claim used to identify the user.
Use Laravel's helper function
Arr::get
when accessing the 'email' key in the$user
array.This prevents PHP from throwing an "Undefined index" error when trying to access the 'email' key that doesn't exist in the array. Valid in the case where the email is not a claim used to identify the user.