Exemplo n.º 1
0
 public function anyNews()
 {
     $list = NewsType::whereRaw("up_id=0")->orderBy("created_at", "desc")->get();
     $data = ["list" => $list];
     return View::make("news")->with($data);
 }
Exemplo n.º 2
0
 public function anyShow(Request $request, $id = null)
 {
     $list = NewsType::whereRaw("type=1 or type=2")->get();
     $data = ["news" => NewsType::find($id), "list" => $list];
     return View::make('newscont', $data);
 }