简而言之,当我尝试访问路线时,Laravel显示404错误,简短描述为“ Page not Found, No query results for model [App\Models\Product] teste ” .

在我的模型中,我有调用路径的方法“teste” .

public function teste($crud = false)
    {
        return '<a class="btn btn-xs btn-default" href="product/teste" data-toggle="tooltip" title="Just a demo custom button."><i class="fa fa-search"></i> Add Item</a>';
    }

button image in the datatable line

在ProductCrudController中添加一个按钮

$this->crud->addButton('top', 'bteste', 'model_function', 'teste', 'beginning');

在custom.php里面我已经尝试过了:

CRUD::resource('product/teste', 'ProductCrudController@teste');
Route::get('product/teste', 'ProductCrudController@teste');

在我的控制器内部,我的方法名为teste

public function teste(){
    return view('vendor/backpack/crud/teste');
}

最后,在这条路径中,我的观点是“非常简单”,只是简单的问候 .

What is the purpose

我需要构建一个表单,允许用户在产品始终自定义后为产品添加“组件” . 这意味着,组件的组合构成了新产品 . 我需要的是:在产品系列中添加一个新按钮,单击该按钮将重定向用户以添加构成此产品的所有组件 . 包含项目的订单的相同想法 .

我自己找不到适合我需要的可能选择 . 这可以通过背包来完成吗?如果有,是否有任何例子可以遵循?

谢谢