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