public static function getbySlug($slug) { $db = new Model(); $pic = $db->getByField(["slug" => $slug], 'pics'); return $pic; }