I'm submitting a form but it shows me the error of
MethodNotAllowedHttpException No message
This is my code.
create.blade.php
<form method="POST" action="/Form/show">
<div class="form-group">
First Name : <input class="form-control" type="text" placeholder="John" name="first_name"/>
</div>
<div class="form-group">
Last Name : <input class="form-control" type="text" placeholder="Wick" name="last_name"/>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
ResourceController.php
public function show(){
$f_data = \App\revesion_registration::all();
return view('Form.show', compact('f_data'));
}
public function create(){
return view('form.create');
}
public function store(){
revesion_registration::create(request(['first_name','last_name']));
return redirect('show');
}
web.php
Route::resource('Form','ResourceController');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire