I have this code in Routes.php
$routes->get('/unidades/editar/?(:id)?', 'Unidades::editar');
I have this code in the controller
public function editar($id)
{
$unidad = $this->unidades->where('id', $id)->first();
$data = ['titulo' => 'Editar unidad', 'datos' => $unidad];
echo view('header');
echo view('unidades/editar', $data);
echo view('footer');
}
and the browser say when i click the botton with the $id=1
404 - File Not Found
Can't find a route for 'get: unidades/editar/1'.
Thank you for your help