路线显示未定义

拉斐尔·阿格莱斯(Rafael Arguelles)

下午好,我正在开发一个包含角色和许可模块的报价系统,我发现自己使用了含咖啡因的供应商的shinobi软件包,我定义了默认路线,但是undefined route error尽管在该web.php文件。执行该php artisan route: list命令,它不会显示显示路线或引号,用户或角色。

Route::post('admin/quotations/store','QuotationController@store')->name('quotations.store')
->middleware('can:quotations.create');

Route::get('admin/quotations','QuotationController@index')->name('quotations.index')
->middleware('can:quotations.index');

Route::get('admin/quotations/create','QuotationController@create')->name('quotations.create')
->middleware('can:quotations.create');

Route::put('admin/quotations/{quotation}','QuotationController@update')->name('quotations.update')
->middleware('can:quotations.edit');

Route::get('admin/quotations/{quotation}','QuotationController@show')->name('quotations.show')
->middleware('can:quotations.show');

Route::delete('admin/quotations/{quotation}','QuotationController@destroy')->name('quotations.destroy')
->middleware('can:quotations.destroy');

Route::get('admin/quotations/{quotation}','QuotationController@edit')->name('quotations.edit')
->middleware('can:quotations.edit');  
<div class="card">
            <div class="card-header">
                Cotizaciones
                    @can('quotations.create')
                        <a href="{{route ('quotations.create')}}" class="btn btn-success float-right">Crear</a>
                    @endcan
            </div>  
            <div class="card-body">
              <table class="table table-striped table-hover">
                    <thead class="table table-primary">
                        <tr>
                            <th>Codigo</th>
                            <th>Cliente</th>
                            <th>Fecha</th>
                            <th>Detalle</th>
                            <th colspan="3">&nbsp;</th>
                        </tr>
                        <tbody>
                            @foreach ($quotations as $quotation)
                                <tr>
                                    <td>{{$quotation->id}}</td>
                                    <td>{{$quotation->client->name}}</td>
                                    <td>{{$quotation->created_at}}</td>
                                    <td>
                                          @can('quotations.show')
                                            <a href="{{route ('quotations.show,$quotation->id')}}" class="btn btn-success float-right">Crear</a>
                                        @endcan
                                    </td>
                                </tr>
                            @endforeach
˚F王

编辑显示路由具有相同的URI是admin/quotations/{quotation}部分的,因此只有最后一个(编辑)被示出。尝试使URI与众不同。那应该解决错误。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章