slack = $slack; } public function handle() { try { $client = new Client(); $client->request('POST', config('app.log_slack'), [ 'headers' => [ 'Content-Type' => 'application/json' ], 'body' => json_encode($this->slack), ]); } catch (Exception $e) { $message = $e->getFile() . " " . $e->getLine() . " " . $e->getMessage(); Log::error('--SlackLogJob RequestException--'); Log::error($message); } catch (RequestException $e) { $message = $e->getFile() . " " . $e->getLine() . " " . $e->getMessage(); Log::error('--SlackLogJob RequestException--'); Log::error($message); } catch (ApiErrorException $e) { $message = $e->getFile() . " " . $e->getLine() . " " . $e->getMessage(); Log::error('--SlackLogJob ApiErrorException--'); Log::error($message); } } }