Answer the question
In order to leave comments, you need to log in
The POST method is not supported for this route. Supported methods: GET, HEAD, what could be the problem?
I started learning Laravel and ran into a problem I can't pass data from the form
routes:
form:
Route::post('reg', '[email protected]');
<form class="needs-validation" method="post" novalidate action="reg">
<h4 class="mb-3">Регистрация клиента</h4>
<div class="col-md-6 mb-3">
<label for="fio">ФИО</label>
<input type="text" class="form-control" name="fio" id="fio" placeholder="" value="" required>
<div class="invalid-feedback">
Пожалуйста, введите ФИO.
</div>
</div>
<button class="btn btn-primary btn-lg btn-block col-md-6 mb-3" type="submit">Зарегистрировать</button>
</form>
class regController extends Controller
{
public function regClient(Request $request){
$name = $request->get("fio");
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question