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