lundi 22 mars 2021

Call to undefined method Illuminate\Support\Facades\Request::all()

I am using session in Laravel 5.1 and here is my Controller code :

Route::post('/task', function (Request $request) {
    $validator = Validator::make($request->all(), [
        'name' => 'required|max:255',
    ]);

    if ($validator->fails()) {
        return redirect('/')
            ->withInput()
            ->withErrors($validator);
    }

   
});

I need to use session, and getting this error : Call to undefined method Illuminate\Support\Facades\Request::all()



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire