laravel backup 404返回视图

时间:2018-07-31 02:05:50

标签: laravel backpack-for-laravel

简而言之,当我尝试访问路由时,Laravel显示404错误,简短描述为“ 找不到页面,模型[App \ Models \ Product] teste没有查询结果< / strong>“。

在模型内部,我有方法“ 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');
}

最后,在此路径中,我有一个“非常简单”的视图,并且只获得了一个简单的问候。

目的是什么

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

我自己找不到适合我需要的可能选择。 可以用背包做吗?如果是这样,有什么例子可循吗?

谢谢

0 个答案:

没有答案