canDo('payment.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('payment.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('payment.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('payment.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('payment.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('payment.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('payment.payment.reject')) { return true; } return false; } }