<?php

namespace BYDAuto\Foundation;

use Illuminate\Support\Facades\DB;

class DBLog
{
    public static function add($message, $content = [], $channel = '')
    {
        $content = json_encode($content, JSON_UNESCAPED_UNICODE);
        DB::table('bydauto_logs')
            ->insert(['message' => $message, 'content' => $content, 'channel' => $channel, 'created_at' => now(), 'updated_at' => now()]);
    }
}
