public function getIsBindEmailAttr($val, $data) : bool { return empty($data['email']) ? false : true; } $user->appedn(['isBindEmail']);