servermgrv2/app/Libraries/Log/DataBase.php
2023-07-17 21:09:49 +09:00

24 lines
443 B
PHP

<?php
namespace App\Libraries\Log;
use \App\Models\LoggerModel;
class DataBase
{
private $_model = null;
public function __construct()
{
$this->_model = new LoggerModel();
}
public function save(string $title, bool $status, array $logs)
{
$datas = array(
'title' => $title,
'status' => $status ? 'use' : 'unuse',
'content' => implode("\n", $logs)
);
return $this->_model->create($datas);
}
}