-2
I’m taking a course of Laravel, and in the course the instructor used a form that points nowhere to show a mistake of the type MethodNotAllowedHttpException. Until then, fine, but when processing the form Laravel does not generate any error, while that of the instructor, with the same code, generates. Why?
Page template:
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"/>
<title>Controle de Series</title>
</head>
<body>
<div class="container">
<div class="jumbotron">
<h1>@yield('cabecalho')<!-- local onde sera inserido o cabecalho da pagina --></h1>
</div>
@yield('conteudo') <!-- local onde sera inserido o conteudo da pagina -->
</div>
</body>
</html>
Page of the form:
@extends('layout')
@section('cabecalho')
Adicionar Serie
@endsection
@section('conteudo')
<form method="post">
<div class="form-group">
<label for="nome">Nome</label>
<input type="text" name="nome" id='nome' class='form-control'/>
</div>
<button class='btn btn-primary'>Adicionar</button>
</form>
@endsection
I’m using Laravel 5.8, with PHP 7.3.5
Error it will still continue giving notfound missed by @csrf after the form opening
– Lucas Antonio
Yes I agree, but I think the question has been edited so it may have existed @csrf.
– Ricardo Lucas