protected function toCollect($notification) : Collection
    {
        return Collection::make([
            'hasBeenRead' => ! is_null($notification->read_at),
            'path' => $notification->data['source_path'],
            'label' => $notification->data['label'],
            'id' => $notification->id,
        ]);
    }
protected function toCollect($notification) : Collection
    {
        return Collection::make([
            'hasBeenRead' => ! is_null($notification->read_at),
            'path' => $notification->data['source_path'],
            'label' => $notification->data['label'],
            'id' => $notification->id,
        ]);
    }
protected function toCollect ( $ notification ) : Collection { return Collection :: make ( [ 'hasBeenRead' => ! is_null ( $ notification -> read_at ) , 'path' => $ notification -> data [ 'source_path' ] , 'label' => $ notification -> data [ 'label' ] , 'id' => $ notification -> id , ] ) ; }
Formats the given notification to the desired array.

@param  mixed $notification

@return array
Formats the given notification to the desired array .