src/Policies/MessagePolicy.php
public function update(UserPolicy $user, Message $message)
    {  
        return $user->id == $message->user_id && get_class($user) == $message->user_type;
    }
public function update(UserPolicy $user, Message $message)
    {  
        return $user->id == $message->user_id && get_class($user) == $message->user_type;
    }
public function update ( UserPolicy $ user , Message $ message ) { return $ user -> id == $ message -> user_id && get_class ( $ user ) == $ message -> user_type ; }
Determine if the given user can update the given message.

@param User $user
@param Message $message

@return bool
Determine if the given user can update the given message .