cfmgrv3 init...2
This commit is contained in:
parent
2a7de29bf3
commit
723df776c6
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Entities\MapurlEntity;
|
use App\Entities\MapurlEntity;
|
||||||
use CodeIgniter\Model;
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
@ -50,7 +51,9 @@ class MapurlModel extends Model
|
|||||||
public function getEntity(int $uid): null|MapurlEntity
|
public function getEntity(int $uid): null|MapurlEntity
|
||||||
{
|
{
|
||||||
$entity = $this->asObject(MapurlEntity::class)->where('uid', $uid)->first();
|
$entity = $this->asObject(MapurlEntity::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;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,6 +69,6 @@ class MapurlModel extends Model
|
|||||||
}
|
}
|
||||||
public function setIndexOrderBy($field, $order = 'ASC')
|
public function setIndexOrderBy($field, $order = 'ASC')
|
||||||
{
|
{
|
||||||
$this->orderBy("oldurl ASC, {$field} {$order}");
|
$this->orderBy("newurl ASC, {$field} {$order}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user