public function postNote() { $info = new info(); $data = info::select('contents')->where('name', 'note')->first(); if ($data == null) { $info->insert(array('name' => 'note', 'contents' => Input::get('note'))); } else { $info->where('name', 'note')->update(array('contents' => Input::get('note'))); } return redirect('admin/website/note'); }
public static function getInfo() { return info::get(); }