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