_model = new \App\Models\LoggerModel(); } public function save(string $title, bool $status, array $logs) { $entity = new \App\Entities\LoggerEntity(); $entity->user_uid = session()->get('uid'); $entity->title = $title; $entity->content = implode("\n", $logs); $entity->status = $status ? 'use' : 'unuse'; return $this->_model->save($entity); } }