下午好,朋友们,我正在开发一个包含角色和许可模块的报价系统,我发现自己正在使用含咖啡因提供商的shinobi包,我定义了默认的路径,但是,尽管在web.php文件中定义了一个路径,但是它会生成一个带有显示路径的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"> </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发布于 2019-07-31 20:38:19
编辑和显示路由具有与admin/quotations/{quotation}部分相同的URI,因此只显示最后一个(编辑)。试着使URI变得清晰。这应该可以解决错误。
https://stackoverflow.com/questions/57298141
复制相似问题