id); $model->name = $input['name']; $model->company_name = $input['company_name']; $model->address = $input['address']; $model->director = $input['director']; $model->contact_phone = $input['contact_phone']; $model->avatar = $input['avatar']; $model->logo = $input['logo']; $model->license_pic = $input['license_pic']; $model->status = UserStatus::UNAUDITED; $model->save(); return $this->response()->success('保存成功')->refresh(); } /** * Build a form here. */ public function form() { Admin::translation('supplier'); $this->text('name')->required(); $this->text('company_name')->required(); $this->text('address')->required(); $this->text('director')->required(); $this->text('contact_phone')->required(); $this->image('avatar'); $this->image('logo')->required(); $this->image('license_pic')->required(); $this->confirm('编辑确认', '编辑内容需要管理员重新审核,确定要提交吗?'); } /** * The data of the form. * * @return array */ public function default() { return Supplier::find(Admin::user()->id)->toArray(); } }