src/Http/Resources/DatabaseNotificationResource.php
public function toArray($request)
    {
        /** @var \Illuminate\Notifications\DatabaseNotification $this->resource */
        return [
            'id'                => $this->id,
            'type'              => class_basename($this->type),
            'data'              => $this->data,
            'read_at'           => (String)$this->read_at,
            'created_at'        => (String)$this->created_at,
        ];
    }
public function toArray($request)
    {
        /** @var \Illuminate\Notifications\DatabaseNotification $this->resource */
        return [
            'id'                => $this->id,
            'type'              => class_basename($this->type),
            'data'              => $this->data,
            'read_at'           => (String)$this->read_at,
            'created_at'        => (String)$this->created_at,
        ];
    }
Transform the resource into an array.

@param  \Illuminate\Http\Request
@return array