/** * Display a listing of the resource. * * @return Response */ public function index($id) { $update = Update::get(); $latest = null; foreach ($update as $time) { $latest = $time->time; } return View::make('article')->with('id', $id)->with('latest', $latest); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $update = Update::get(); $latest = null; foreach ($update as $time) { $latest = $time->time; } echo $latest; }
function detect_update_system() { $loadData = Update::get(); $encodeData = serialize($loadData); $md5Data = md5($encodeData); $path = CACHES_PATH . 'dbcache/plugin/autoupdate/'; $filePath = $path . $md5Data . '.cache'; if (!file_exists($filePath)) { Update::make(); File::create($filePath, 'ok'); } }
public function update() { $post = array('alert' => ''); if (Request::has('btnStart')) { // System::saveMailSetting(Request::get('mail')); Update::make(); $post['alert'] = '<div class="alert alert-success">Update system success.</div>'; } $post['data'] = Update::get(); // print_r($post);die(); View::make('admincp/head', array('title' => 'Update System - ' . ADMINCP_TITLE)); self::makeContents('updateVersion', $post); View::make('admincp/footer'); }
public function testUpdate() { $update = new Update($this->driver); $update->update('table')->set('a', '?')->set('b', '?')->values(['c' => '?', 'd' => '?'])->where('c=d'); $this->assertEquals('UPDATE table SET a=?, b=?, c=?, d=? WHERE c=d', $update->get()); }