Laravel 5 在laravel背包中的编辑表单下方添加网格作为

Laravel 5 在laravel背包中的编辑表单下方添加网格作为,laravel-5,backpack-for-laravel,Laravel 5,Backpack For Laravel,我有用户,他们有许多帖子s. 在User编辑表单下方,我想显示相关的Posts网格 以下功能将带来相关职位。 如何在编辑User表单的上方/内部/下方组合它 我知道这个函数可以工作,只是不知道如何组合它 // user crud controller public function getUserRlatedPosts($user_id) { $crud = new CrudPanel(); $crud->addClause('where

我有
用户
,他们有许多
帖子
s.
User
编辑表单下方,我想显示相关的
Post
s网格

以下功能将带来相关职位。 如何在编辑
User
表单的上方/内部/下方组合它

我知道这个函数可以工作,只是不知道如何组合它

// user crud controller

    public function getUserRlatedPosts($user_id)
    {

        $crud = new CrudPanel();
        $crud->addClause('where', 'user_id', '=', $user_id);
        $crud->setModel("post");
        $crud->setEntityNameStrings("post","posts");
        $crud->enableAjaxTable();

        $this->data['crud'] = $crud;
        $this->data['title'] = ucfirst($this->crud->entity_name_plural);
        if (! $this->data['crud']->ajaxTable()) {
            $this->data['entries'] = $this->data['crud']->getEntries();
        }
        return view('crud::list', $this->data);
    }

在BACKBACK\CRUD 3.2.x中,您可以通过以下方法使用自定义视图:

$this->crud->setShowView('your-view');
$this->crud->setEditView('your-view');
$this->crud->setCreateView('your-view');
$this->crud->setListView('your-view');
$this->crud->setReorderView('your-view');
$this->crud->setRevisionsView('your-view');
$this->crud->setRevisionsTimelineView('your-view');
$this->crud->setDetailsRowView('your-view');

并指定包含该表单的视图。

谢谢,我已经知道了。但我不明白如何才能做到这一点?我是否应该将供应商的视图移动到我的视图文件夹并进行更改?你能解释一下吗?也许是伪代码?我在文档或git问题中没有看到任何类似的内容。谢谢阿加尼·沙扎姆。不,只需在/resources/中创建一个/vendor/backpack/crud文件夹。那就行了。然后将要自定义的单个文件放在那里。