public function getViews() { $views = View::orderBy('count', 'desc')->get(); if (is_null($views)) { return []; } return $views->toArray(); }