I have a system that was working, but suddenly it stopped working. "I've been using Lumen with the package barryvdh / laravel-cors, the whole site works except for a public form that gives me this error .
The request is made through Angular:
insert (data: Object) {
let observable = this.http.post(this.url, data, this.requestOptions.merge(new RequestOptions()));
return this.toPromise(observable);
}
In Lumen I get the request through the route that forwards this function:
public function store(Request $request){
$this->validate($request, $this->rules ?? [], $this->messages ?? []);
$result = $this->model->create($request->all());
return response()->json($result);
}
insira o código aqui