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()]);
 }
Exemple #2
0
 public function index()
 {
     $newsModel = new NewsModel();
     $data = ['title' => 'Главная', 'last5news' => $newsModel->lastN(5)];
     return view("pages.home", $data);
 }
Exemple #3
0
 public function watch($id = 0)
 {
     $newsModel = new NewsModel();
     $data = ['title' => 'Новости', 'news' => $newsModel->getOne($id)];
     return view("pages.news.watch", $data);
 }