'nullable', 'image' => 'require', 'link' => 'nullable', 'type' => 'nullable', 'sort' => 'nullable|numeric', ]; /** * 参数描述 * @var string[] */ protected $field = [ 'title' => '标题', 'image' => '图片', 'link' => '链接', 'type' => '类型', 'sort' => '排序', ]; /** * @notes 编辑场景 */ public function sceneEdit() { return $this->only(['id','title', 'image', 'link', 'type', 'sort']); } public function sceneId() { return $this->only(['id']); } }