From 9f29ab9338fa5900455ba2495266462a24d5a718 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 3 Nov 2018 21:25:26 -0600 Subject: [PATCH] Update Report model --- app/Report.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/Report.php b/app/Report.php index ef202266a..b04b37357 100644 --- a/app/Report.php +++ b/app/Report.php @@ -22,14 +22,15 @@ class Report extends Model { $class = $this->object_type; switch ($class) { - case 'App\Status': - $column = 'id'; - break; + case 'App\Status': + $column = 'id'; + break; - default: - $column = 'id'; - break; - } + default: + $class = 'App\Status'; + $column = 'id'; + break; + } return (new $class())->where($column, $this->object_id)->firstOrFail(); }