1
I crud it, but I changed the organization of the files, instead of following the pattern, I created a user folder that contains the controller, route and model. I would like the help to try to understand why I can’t find the route by link_to_route.
Routes.php
Route::resource('/', '\App\Usuario\Http\Controllers\UsuariosController');
usuarios/index.blade.php
@foreach ($usuarios as $usuario)
<tbody>
<tr>
<td>{{$usuario->nome}}</td>
<td>{{$usuario->sobrenome}}</td>
<td>{{$usuario->email}}</td>
<td>{{$usuario->usuario}}</td>
<td>{{$usuario->created_at}}</td>
<td>{{$usuario->updated_at}}</td>
<!--É necessário uma rotas nomeada-->
<td>{{ link_to_route('edit', $title = 'Editar', $usuario->id, $attributes = []) }}</td>
</tr>
</tbody>
@endforeach
This is the mistake:
NotFoundHttpException in RouteCollection.php line 161
Thank you Vinicius Luiz for taking the time to help me.
– Rafael
According to the solution you commented below you can remake it in a simpler way...
– Vinicius Luiz