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