Forget about using a separate Request file in Laravel. You can do it from within the Laravel Controller file like this:

NOTICE: It is not recommended to do this, its better to use a file. See Video Below.

    public function store(Request $request, User $user){
        $data = $request->validate([
            'name' => ['required', 'string','max:100'],
        ]);
        $user ->update{$data};
        return response()->json($user, 200);
    }

Resource:

9V9BUHtvwXI

Why not do this.

 

3P2uNeY9Azs