public function remove() { $newsModel = new NewsModel(); $input = Input::all(); $newsModel->where('id', '=', $input['remove_id'])->delete(); return view('pages.adminzone.news', ['title' => "Добавление новостей", 'news' => $newsModel->all()]); }
public function index() { $newsModel = new NewsModel(); $data = ['title' => 'Главная', 'last5news' => $newsModel->lastN(5)]; return view("pages.home", $data); }
public function watch($id = 0) { $newsModel = new NewsModel(); $data = ['title' => 'Новости', 'news' => $newsModel->getOne($id)]; return view("pages.news.watch", $data); }