How to make default request values inside $validated array in Laravel?
Controller code: public function store(UserStoreRequest $request) { $validated = $request->validated(); $validated['user_type_id'] = 2; $validated['user_gender_id'] = $request->user_gender_id; $validated['last_login_at'] = Carbon::now(); $validated['password'] = Hash::make($request->password); User::create($validated); return to_route('all-users'); } Is there a better way to do this? I tried something like this but…