Posts

Showing posts with the label laravel-events

Laravel Job not recognizing object property

Laravel Job not recognizing object property I am passing a request to a job class to send an email for a contact form. The issue is that I cannot directly access the property. I set the $request in the constructor as $this->request = $request; $this->request = $request; In the handle() method, I do this: handle() Log::info( 'job-contact-request', [ 'request' => $this->request ] ); the log spits out: [2018-06-30 14:07:34] local.INFO: request {"request":"[object] (AppEventsContactRequestValidated: {"request":{"client_name":"Daniel","client_email":"email@email.com","client_phone":"1234567891","client_text":"blargle carble darble zarble"},"socket":null})"} Which shows that the client_email is set. But when I try to access $this->request->client_email , I get: $this->request->client_email [2018-06-30 14:15:30] local.ERROR: Undefin...