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