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