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