skip to Main Content

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…

VIEW QUESTION

What should be the host name in nestjs hybrid microservice when deployed on Kubernetes – Nginx

Tech stack - nestjs - 2 microservice kubernetes - AWS EKS Ingress - nginx Hybrid const app = await NestFactory.create(AppModule); const microservice = app.connectMicroservice<MicroserviceOptions>( { transport: Transport.TCP, options: { host: process.env.TCP_HOST, port: parseInt(process.env.TCP_EVALUATION_PORT), }, }, { inheritAppConfig: true }, );…

VIEW QUESTION
Back To Top
Search