what's wrong with my routes?
(我的路线怎么了?)
it cant redirect to my edit-info form inside InfosController(它无法重定向到InfosController内的我的edit-info表单)
web.php
(web.php)
route::get('/info-admin/{$info}/edit','InfosController@edit');
info-admin.blade.php
(info-admin.blade.php)
@foreach ( $info as $infos )
<tr>
<th scope="row" class="align-middle">{{ $loop->iteration }}</th>
<td class="align-middle">{{ $infos->judul }}</td>
<td class="align-middle">{{ $infos->konten }}</td>
<td class="align-middle">{{ $infos->image }}</td>
<td class="align-middle">{{ $infos->created_at }}</td>
<td class="align-middle">{{ $infos->Updated_at }}</td>
<td class="align-middle form">
<a href="/info-admin/{{ $infos->id }}/edit"><button type="submit" class="btn btn-info mb-3">Edit</button></a>
<form method="POST" action="{{ route('infos.destroy', [$infos->id]) }}">
{{ csrf_field() }}
{{ method_field('DELETE') }}
<button type="submit" class="btn btn-danger">Hapus</button>
</form>
</td>
</tr>
@endforeach
InfosController@edit
(InfosController @编辑)
public function edit($id)
{
return view('admin.edit-info');
}
what did i do wrong, why laravel cant find my routes?
(我做错了什么,为什么拉拉维尔(Laravel)找不到我的路线?)
ask by Bagas Kurniawan translate from so