0

This is the error I have

screenshot error

Here I attach the code in my controller $siniestro->update($request->all());

         function authenticated(Request $request, $user) {
        if ($user->role_id == 1) {
            return redirect('siniestros.index');
        } else  ($user->role_id == 2) {
            return redirect('siniestros.derivar');
        }
    };