venturo/php-mongodb-log

Log using php + mongodb

1.0.0 2023-10-24 07:34 UTC

This package is auto-updated.

Last update: 2024-04-24 08:53:06 UTC


README

Package Log with PHP and MongoDB

How to install Venturo Log

composer require venturo/php-mongodb-log

Example of Venturo Laravel FCM

use Venturo\PhpMongodbLog\Log;

Setup Log

$config = [
    'url' => 'mongodb+srv://kelasventuro****',
    'database' => '****',
    'collection' => '****',
    'field' => ['field1', 'field2', 'field3', '...'],
];
$log = new Log($config);

Add Log

$log->add(['field1' => 'value of field1', 'field2' => 'value of field2', 'field3' => 'value of field 3', '...' => '...']);

Read Log

$log->read();