public function assignToUser(User $user)
    {
        if ($this->belongsToUser($user)) {
            return true;
        }
        $this->users()->attach($user->id);
        return true;
    }
public function assignToUser(User $user)
    {
        if ($this->belongsToUser($user)) {
            return true;
        }
        $this->users()->attach($user->id);
        return true;
    }
public function assignToUser ( User $ user ) { if ( $ this -> belongsToUser ( $ user ) ) { return true ; } $ this -> users ( ) -> attach ( $ user -> id ) ; return true ; }
Assign Role to User

@param User $user

@return bool
Assign Role to User