column('id', __('Id')); $grid->column('user_id', __('User id')); $grid->column('docter_id', __('Docter id')); $grid->column('patient_id', __('Patient id')); $grid->column('organization_id', __('Organization id')); $grid->column('order_sn', __('Order sn')); $grid->column('payment_type', __('Payment type')); $grid->column('product_type', __('Product type')); $grid->column('order_status', __('Order status')); $grid->column('payment_status', __('Payment status')); $grid->column('total_amount', __('Total amount')); $grid->column('payment_amount', __('Payment amount')); $grid->column('discount_amount', __('Discount amount')); $grid->column('payment_time', __('Payment time')); $grid->column('created_at', __('Created at')); $grid->column('updated_at', __('Updated at')); return $grid; } /** * Make a show builder. * * @param mixed $id * @return Show */ protected function detail($id) { $show = new Show(Order::findOrFail($id)); $show->field('id', __('Id')); $show->field('user_id', __('User id')); $show->field('docter_id', __('Docter id')); $show->field('patient_id', __('Patient id')); $show->field('organization_id', __('Organization id')); $show->field('order_sn', __('Order sn')); $show->field('payment_type', __('Payment type')); $show->field('product_type', __('Product type')); $show->field('order_status', __('Order status')); $show->field('payment_status', __('Payment status')); $show->field('total_amount', __('Total amount')); $show->field('payment_amount', __('Payment amount')); $show->field('discount_amount', __('Discount amount')); $show->field('payment_time', __('Payment time')); $show->field('created_at', __('Created at')); $show->field('updated_at', __('Updated at')); return $show; } /** * Make a form builder. * * @return Form */ protected function form() { $form = new Form(new Order()); $form->number('user_id', __('User id')); $form->number('docter_id', __('Docter id')); $form->number('patient_id', __('Patient id')); $form->number('organization_id', __('Organization id')); $form->text('order_sn', __('Order sn')); $form->switch('payment_type', __('Payment type'))->default(1); $form->switch('product_type', __('Product type'))->default(1); $form->switch('order_status', __('Order status'))->default(1); $form->switch('payment_status', __('Payment status'))->default(1); $form->number('total_amount', __('Total amount')); $form->number('payment_amount', __('Payment amount')); $form->number('discount_amount', __('Discount amount')); $form->number('payment_time', __('Payment time')); return $form; } }