environment(); $errorType = class_basename($this->exception); return (new MailMessage) ->subject("[URGENT] [{$environment}] System Error: {$errorType} - Libra Law Firm") ->greeting('System Alert') ->line('A critical error occurred on the platform.') ->line("**Error Type:** {$errorType}") ->line('**Message:** '.$this->exception->getMessage()) ->line('**File:** '.$this->exception->getFile().':'.$this->exception->getLine()) ->line('**Time:** '.now()->format('Y-m-d H:i:s')) ->line("**Environment:** {$environment}") ->line('Please check the application logs for full stack trace and details.') ->salutation('— Libra System Monitor'); } public function toArray(object $notifiable): array { return [ 'type' => 'system_error', 'error_type' => class_basename($this->exception), 'message' => $this->exception->getMessage(), ]; } }