From 723df776c6833199a859af9b061d22ef03744268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Mon, 19 Jun 2023 19:28:57 +0900 Subject: [PATCH] cfmgrv3 init...2 --- app/Models/MapurlModel.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/Models/MapurlModel.php b/app/Models/MapurlModel.php index 210c99c..effb03c 100644 --- a/app/Models/MapurlModel.php +++ b/app/Models/MapurlModel.php @@ -1,6 +1,7 @@ asObject(MapurlEntity::class)->where('uid',$uid)->first(); - if(is_null($entity)){ throw new \Exception(__METHOD__."에서 {$uid} 해당 정보가 없습니다."); } + $entity = $this->asObject(MapurlEntity::class)->where('uid', $uid)->first(); + if (is_null($entity)) { + throw new \Exception(__METHOD__ . "에서 {$uid} 해당 정보가 없습니다."); + } return $entity; } @@ -59,13 +62,13 @@ class MapurlModel extends Model $this->orLike('oldurl', $word, 'both'); //befor , after , both $this->orLike('newurl', $word, 'both'); //befor , after , both } - public function setIndexDateFilter($start,$end) + public function setIndexDateFilter($start, $end) { $this->where('created_at >=', $start); $this->where('created_at <=', $end); } public function setIndexOrderBy($field, $order = 'ASC') { - $this->orderBy("oldurl ASC, {$field} {$order}"); + $this->orderBy("newurl ASC, {$field} {$order}"); } }