title = "Order detail" url = "/order-detail/:orderId" layout = "platform_main" is_hidden = 0 [order] == param("orderId"); $orderId = $this->param("orderId"); $this["order"] = Romanah\Gokbakja\Models\Order::where("id", $orderId)->with(["client", "shipping"]) ->withCount(['order_items as order_all_amount' => function($query) { $query->select(DB::raw('sum(amount)')); }]) ->withCount(['order_items as order_all_price' => function($query) { $query->select(DB::raw('sum(price)')); }]) ->first(); $this["all"] = ($this["order"]->order_all_amount * $this["order"]->order_all_price); $this["orderItems"] = Romanah\Gokbakja\Models\OrderItem::where("order_id", $orderId)->orderBy("id", "DESC")->with(["type", "size"])->get(); $this["sizes"] = Romanah\Gokbakja\Models\BagSize::get(); $this["types"] = Romanah\Gokbakja\Models\BagType::get(); } ?> == {% put styles %} {% endput %}

Sargyt Maglumatlary

{% put scripts %} {% endput %} {% partial 'dataTableJs' %}