我正在向删除控制器发送一个 id,但它是“null”。我可以遗漏什么吗?这是删除控制器:public function destroy(DomainPage $domainPage) { dd($domainPage); }这是模型:protected $fillable = [ 'domain_page_slug', 'is_published', 'domain_page_discount', ]; public function translations() { return $this->hasMany(DomainPagesTranslations::class, 'domain_page_id'); }这是刀片:<form action="{{route('admin.domain.destroy', [$domainPage->id])}}" method='post' class=" text-right" > <a href="{{route('admin.domain.edit', [$domainPage->id])}}" class="btn btn-primary mr-1 btn-sm">Edit</a> {!! csrf_field() !!} @method('delete') <button type="submit" class="btn btn-danger btn-sm">Delete</button> </form>这是路线:Route::resource('domain', 'Admin\DomainPageController')
- 1 回答
- 0 关注
- 103 浏览
添加回答
举报
0/150
提交
取消