I apologize if this is just a misunderstanding on my part in how to use Laravel.
I'm learning Laravel and I'm building a small application, however, I try to make a form in a view to pass data to a Controller but I get the following message.
ErrorException
Action App\Http\Controllers\clientesController@confirmarEdit not defined. (View: (redacted)\laravel\resources\views\clientesEditar.blade.php)
This method is indeed defined in clientesController, where all the others controllers are defined and work:
public function confirmarEdit($id)
{
...
}
I'm using the LaravelCollective package to use forms, following the documentation which states I can use pass form data to Controllers, I'm calling this method using a View, this way:
<!DOCTYPE html>
<html>
<head>
<title>Modificar Cliente {{ $cliente[0]->id }}</title>
</head>
<body>
<ul>
{{Form::open(['action' => ['clientesController@confirmarEdit', $cliente[0]->id]])}}
Nombre: {{ Form::text('cnom', $cliente[0]->nombre)}}
Apellido: {{ Form::text('cape', $cliente[0]->apellido)}}
Empresa: {{ Form::text('cnom', $cliente[0]->empresa)}}
<input type="submit" value="Editar">
{{Form::close()}}
</body>
</html>
Calling the method from a Route works, but not if I call it from a view, what am I doing wrong?
Thank you in advance.