lundi 21 août 2017

Method validate does not exist - Laravel 5.4

I have a very weird problem. When I'm submitting the form, it throws an error with server-side validation.

Here is my simple controller:

namespace App\Http\Controllers;

use Newsletter;
use Illuminate\Http\Request;

class SubscriptionController extends Controller
{
    public function subscribe(Request $request)
    {
        $request->validate([
            'email' => 'required|email',
            ]);
    }
}

Submitting the form gives me:

BadMethodCallException Method validate does not exist.

it should work according to:

http://ift.tt/2nHnri2



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2vhqWij
via IFTTT

Aucun commentaire:

Enregistrer un commentaire