diff --git a/app/Report.php b/app/Report.php index ef202266..b04b3735 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(); }