0
테이블 news
이 있습니다. 내 컨트롤러에서laravel에서 페이징을 사용하는 방법
, 내가 쓰기 : 홈/현재보기에서
public function datnuoc(){
$tinxkldMoi1 = DB::table ('news')->where ('datnuoc',1)->where('status',1)->orderBy('endDate', 'desc')->orderBy('created_at', 'desc')->paginate(20);
$tinxkldMoi2 = DB::table ('news')->where ('datnuoc',1)->take(5)->orderBy('endDate', 'desc')->orderBy('created_at', 'desc')->paginate(20);
$tinxkldMoi3 = DB::table ('news')->where ('datnuoc',1)->where('status',3)->take(5)->orderBy('endDate', 'desc')->orderBy('created_at', 'desc')->paginate(20);
return View::make ('home/current',array(
'tinxkldMois1'=> $tinxkldMoi1,
'tinxkldMois2'=> $tinxkldMoi2,
'tinxkldMois3'=> $tinxkldMoi3,
));
}
, 내가 쓴 :
<php>
{{$tinxkldMois1->links()}}
{{$tinxkldMois2->links()}}
{{$tinxkldMois3->links()}}
</php>
나는 그것이 작동 한 부분을 클릭 할 때 온,하지만 어떻게 다른 사람들에게?