【发布时间】:2020-10-09 06:32:46
【问题描述】:
我发现了这个错误 [Route: roles.destroy] [URI: roles/{role}] 缺少必需的参数。 (查看:E:\wamp64\www\student_system\resources\views\roles\table.blade.php)
<div class="table-responsive">
<table class="table" id="roles-table">
<thead>
<tr>
<th>Name</th>
<th colspan="3">Action</th>
</tr>
</thead>
<tbody>
@foreach($roles as $role)
<tr>
<td>{{ $role->name }}</td>
<td>
{!! Form::open(['route' => ['roles.destroy', $role->id], 'method' => 'delete']) !!}
<div class='btn-group'>
<a href="{{ route('roles.show', [$role->id]) }}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-eye-open"></i></a>
<a href="{{ route('roles.edit', [$role->id]) }}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-edit"></i></a>
{!! Form::button('<i class="glyphicon glyphicon-trash"></i>', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}
</div>
{!! Form::close() !!}
</td>
</tr>
@endforeach
</tbody>
</table>
【问题讨论】:
-
欢迎来到 SO ... 你的代码在哪里?
-
嗨@Muhammad Imran,您能分享what you have tried 来解决上述问题吗?
标签: laravel error-handling infyom