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