刚买的小鸡搭建的独角兽发卡,后台正常进去,点击商品显示就出错了,谁能告诉我哪里出错啦
ErrorException
Undefined variable: form
http://woaifk.cc/admin/goods/1
Stack trace
Request
App
User
Context
Debug
Share
Expand vendor frames
64
app/Admin/Controllers/GoodsController.php
Illuminate\Foundation\Bootstrap\HandleExceptions
:95
63
app/Admin/Controllers/GoodsController.php
App\Admin\Controllers\GoodsController
:95
1 unknown frame
45 vendor frames…
16
app/Http/Middleware/DujiaoSystem.php
App\Http\Middleware\DujiaoSystem
:29
14 vendor frames…
1
public/index.php
:55
Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
app/Admin/Controllers/GoodsController.php:95
});
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new Goods(), function (Show $show) {
$show->id('id');
$show->field('gd_name');
$form->field('gd_description');
$form->field('gd_keywords');
$show->field('picture')->image();
$show->field('retail_price');
$show->field('actual_price');
$show->field('in_stock');
$show->field('ord');
$show->field('sales_volume');
$show->field('type')->as(function ($type) {
if ($type == GoodsModel::AUTOMATIC_DELIVERY) {
return admin_trans('goods.fields.automatic_delivery');
} else {
return admin_trans('goods.fields.manual_processing');
}
});
$show->field('is_open')->as(function ($isOpen) {