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