I have the following route
Route::resource('mail', 'MailController');
Which I call in the following form:
@extends('layouts.app')
@section('content')
<div class="content">
<div class="row">
@if (Session::has('message'))
<div class="alert alert-info">{{ Session::get('message') }}</div>
@endif
<div class="col-sm-10 ">
<div class="panel panel-default">
<div class="panel-heading">Contáctenos</div>
<div class="panel-body">
<form class="form-horizontal" method="POST" action="{{route('mail.store')}}">...
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
with its corresponding formrequest:
<?php
namespace libreir\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class MailFormRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'nombre' => 'required|string',
'email' => 'required|email|max:255',
'texto' => 'string|required'
];
}
}
and I should enter the store method specified in the form's path, but for some anomaly that I do not know, I get the following message:
Any explanation of why and a solution?