canDo('chat.chat.approve')) { return true; } return false; } /** * Determine if the given user can approve the given chat. * * @param Authenticatable $user * * @return bool */ public function submit(Authenticatable $user, Chat $chat) { if ($user->canDo('chat.chat.submit')) { return true; } return false; } /** * Determine if the given user can approve the given chat. * * @param Authenticatable $user * * @return bool */ public function publish(Authenticatable $user, Chat $chat) { if ($user->canDo('chat.chat.publish')) { return true; } return false; } /** * Determine if the given user can approve the given chat. * * @param Authenticatable $user * * @return bool */ public function unpublish(Authenticatable $user, Chat $chat) { if ($user->canDo('chat.chat.unpublish')) { return true; } return false; } /** * Determine if the given user can approve the given chat. * * @param Authenticatable $user * * @return bool */ public function archive(Authenticatable $user, Chat $chat) { if ($user->canDo('chat.chat.archive')) { return true; } return false; } /** * Determine if the given user can approve the given chat. * * @param Authenticatable $user * * @return bool */ public function unarchive(Authenticatable $user, Chat $chat) { if ($user->canDo('chat.chat.unarchive')) { return true; } return false; } /** * Determine if the given user can approve the given chat. * * @param Authenticatable $user * * @return bool */ public function reject(Authenticatable $user, Chat $chat) { if ($user->canDo('chat.chat.reject')) { return true; } return false; } }