cfmgrv3 init...2

This commit is contained in:
최준흠 2023-06-19 19:50:35 +09:00
parent 4e85bceb5b
commit d8be9d8d6c

View File

@ -1,6 +1,7 @@
<?php
namespace App\Models;
use App\Entities\LoggerEntity;
use CodeIgniter\Model;
@ -51,7 +52,9 @@ class LoggerModel extends Model
public function getEntity(int $uid): null|LoggerEntity
{
$entity = $this->asObject(LoggerEntity::class)->where('uid', $uid)->first();
if(is_null($entity)){ throw new \Exception(__METHOD__."에서 {$uid} 해당 정보가 없습니다."); }
if (is_null($entity)) {
throw new \Exception(__METHOD__ . "에서 {$uid} 해당 정보가 없습니다.");
}
return $entity;
}
@ -67,6 +70,6 @@ class LoggerModel extends Model
}
public function setIndexOrderBy($field, $order = 'ASC')
{
$this->orderBy("title ASC, {$field} {$order}");
$this->orderBy("{$field} {$order}");
}
}