I'm trying to make a put route for an edition form in my app.
Here's the route I created :
Route::put('admin/monitor/{$id_monitor}',
array(
'as' => 'admin/monitor/update',
'uses' => 'MonitorController@update'
)
);
The edit.blade.php
:
{{ Form::open(array('route' => array('admin/monitor/update', $monitor->id_monitors), 'method' => 'PUT')) }}
// Stuff related to the inputs etc.
{{ Form::submit() }}
{{ Form::close() }}
And finally the update
function :
class MonitorController extends BaseController {
// Some other methods
public function update($id_monitor) {
echo "Form submitted !";
die;
}
}
The problem is that when I submit the form, I'm getting a NotFoundHttpException
. Could someone explain to me what did I miss ?
Thanks !