public function getList() { $pdo = DB::getInstance(); $pdo->select('*')->from('works'); $res = $pdo->execute(); $list = array(); foreach ($res as $data) { $list[] = new \App\Models\Work($data['title'], $data['urlImg'], $data['description']); } return $list; }
public function getList() { $pdo = DB::getInstance(); $pdo->select('*')->from('career')->where('type = ?', 2); $res = $pdo->execute(); $list = array(); foreach ($res as $data) { $job = new \App\Models\Job($data['title'], $data['date_start'], $data['date_end'], $data['town'], $data['company'], $data['description']); $list[] = $job; } return $list; }
public function getList() { $pdo = DB::getInstance(); $pdo->select('*')->from('career')->where('type = ?', 1); $res = $pdo->execute(); $list = array(); foreach ($res as $data) { $training = new \App\Models\Training($data['title'], $data['date_start'], $data['date_end'], $data['town'], $data['school']); $list[] = $training; } return $list; }