can('dcat.admin.product_spus.add_sku'); } /** * Handle the form request. * * @param array $input * * @return mixed */ public function handle(array $input) { dd($input); return $this->response() ->success(__('admin.update_succeeded')) ->refresh(); } /** * Build a form here. */ public function form() { $orderId = $this->payload['order_id'] ?? 0; $order = Order::findOrFail($orderId); $this->hidden('order_id'); $this->text('shipping_company'); $this->text('shipping_number'); $this->hasMany('packages', function (Form $form) use ($order) { $form->select('order_product_id')->options($order->products->pluck('name', 'id')); $form->number('quantity')->min(0); }); $this->disableResetButton(); } /** * The data of the form. * * @return array */ public function default() { return [ // 'name' => 'John Doe', // 'email' => 'John.Doe@gmail.com', ]; } }