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