Commit 0294ed86 by Bagus Pambudi

limit berita index bhs lain

parent c4beaf0a
...@@ -49,7 +49,7 @@ class FrontController extends Controller ...@@ -49,7 +49,7 @@ class FrontController extends Controller
$posts = Posts::where('post_status', '1')->orderby('post_date', 'desc')->paginate($setting['post_per_page']); $posts = Posts::where('post_status', '1')->orderby('post_date', 'desc')->paginate($setting['post_per_page']);
$posthome = Posts::where('post_status', '1')->orderby('post_date', 'desc')->paginate(isset($setting['post_home'])?$setting['post_home']:'6'); $posthome = Posts::where('post_status', '1')->orderby('post_date', 'desc')->paginate(isset($setting['post_home'])?$setting['post_home']:'6');
$resend = Posts::where('post_status', '1')->orderby('post_date', 'desc')->limit(isset($setting['limit_terkini'])?$setting['limit_terkini']:'5')->get(); $resend = Posts::where('post_status', '1')->orderby('post_date', 'desc')->limit(isset($setting['limit_terkini'])?$setting['limit_terkini']:'5')->get();
$hot = Posts::where('post_status', '1')->orderby('viewer', 'desc')->limit(isset($setting['limit_populer'])?$setting['limit_terkini']:'5')->get(); $hot = Posts::where('post_status', '1')->orderby('viewer', 'desc')->limit(isset($setting['limit_populer'])?$setting['limit_populer']:'5')->get();
$info = Information::where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get(); $info = Information::where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get();
$agenda = Agenda::where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get(); $agenda = Agenda::where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get();
$slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get(); $slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get();
...@@ -85,8 +85,8 @@ class FrontController extends Controller ...@@ -85,8 +85,8 @@ class FrontController extends Controller
private function getDataEn($setting) private function getDataEn($setting)
{ {
$posts = Posts::with(['rEn'])->where('post_status', '1')->orderby('post_date', 'desc')->paginate($setting['post_per_page']); $posts = Posts::with(['rEn'])->where('post_status', '1')->orderby('post_date', 'desc')->paginate($setting['post_per_page']);
$resend = Posts::with(['rEn'])->where('post_status', '1')->orderby('post_date', 'desc')->limit('5')->get(); $resend = Posts::with(['rEn'])->where('post_status', '1')->orderby('post_date', 'desc')->limit(isset($setting['limit_terkini'])?$setting['limit_terkini']:'5')->get();
$hot = Posts::with(['rEn'])->where('post_status', '1')->orderby('viewer', 'desc')->limit('5')->get(); $hot = Posts::with(['rEn'])->where('post_status', '1')->orderby('viewer', 'desc')->limit(isset($setting['limit_populer'])?$setting['limit_populer']:'5')->get();
$info = Information::with(['rEn'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get(); $info = Information::with(['rEn'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get();
$agenda = Agenda::with(['rEn'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get(); $agenda = Agenda::with(['rEn'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get();
$slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get(); $slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get();
...@@ -121,8 +121,8 @@ class FrontController extends Controller ...@@ -121,8 +121,8 @@ class FrontController extends Controller
private function getDataDe($setting) private function getDataDe($setting)
{ {
$posts = Posts::with(['rDe'])->where('post_status', '1')->orderby('post_date', 'desc')->paginate($setting['post_per_page']); $posts = Posts::with(['rDe'])->where('post_status', '1')->orderby('post_date', 'desc')->paginate($setting['post_per_page']);
$resend = Posts::with(['rDe'])->where('post_status', '1')->orderby('post_date', 'desc')->limit('5')->get(); $resend = Posts::with(['rDe'])->where('post_status', '1')->orderby('post_date', 'desc')->limit(isset($setting['limit_terkini'])?$setting['limit_terkini']:'5')->get();
$hot = Posts::with(['rDe'])->where('post_status', '1')->orderby('viewer', 'desc')->limit('5')->get(); $hot = Posts::with(['rDe'])->where('post_status', '1')->orderby('viewer', 'desc')->limit(isset($setting['limit_populer'])?$setting['limit_populer']:'5')->get();
$info = Information::with(['rDe'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get(); $info = Information::with(['rDe'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get();
$agenda = Agenda::with(['rDe'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get(); $agenda = Agenda::with(['rDe'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get();
$slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get(); $slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get();
...@@ -157,8 +157,8 @@ class FrontController extends Controller ...@@ -157,8 +157,8 @@ class FrontController extends Controller
private function getDataSa($setting) private function getDataSa($setting)
{ {
$posts = Posts::with(['rSa'])->where('post_status', '1')->orderby('post_date', 'desc')->paginate($setting['post_per_page']); $posts = Posts::with(['rSa'])->where('post_status', '1')->orderby('post_date', 'desc')->paginate($setting['post_per_page']);
$resend = Posts::with(['rSa'])->where('post_status', '1')->orderby('post_date', 'desc')->limit('5')->get(); $resend = Posts::with(['rSa'])->where('post_status', '1')->orderby('post_date', 'desc')->limit(isset($setting['limit_terkini'])?$setting['limit_terkini']:'5')->get();
$hot = Posts::with(['rSa'])->where('post_status', '1')->orderby('viewer', 'desc')->limit('5')->get(); $hot = Posts::with(['rSa'])->where('post_status', '1')->orderby('viewer', 'desc')->limit(isset($setting['limit_populer'])?$setting['limit_populer']:'5')->get();
$info = Information::with(['rSa'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get(); $info = Information::with(['rSa'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get();
$agenda = Agenda::with(['rSa'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get(); $agenda = Agenda::with(['rSa'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get();
$slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get(); $slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get();
...@@ -193,8 +193,8 @@ class FrontController extends Controller ...@@ -193,8 +193,8 @@ class FrontController extends Controller
private function getDataZh($setting) private function getDataZh($setting)
{ {
$posts = Posts::with(['rZh'])->where('post_status', '1')->orderby('post_date', 'desc')->paginate($setting['post_per_page']); $posts = Posts::with(['rZh'])->where('post_status', '1')->orderby('post_date', 'desc')->paginate($setting['post_per_page']);
$resend = Posts::with(['rZh'])->where('post_status', '1')->orderby('post_date', 'desc')->limit('5')->get(); $resend = Posts::with(['rZh'])->where('post_status', '1')->orderby('post_date', 'desc')->limit(isset($setting['limit_terkini'])?$setting['limit_terkini']:'5')->get();
$hot = Posts::with(['rZh'])->where('post_status', '1')->orderby('viewer', 'desc')->limit('5')->get(); $hot = Posts::with(['rZh'])->where('post_status', '1')->orderby('viewer', 'desc')->limit(isset($setting['limit_populer'])?$setting['limit_populer']:'5')->get();
$info = Information::with(['rZh'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get(); $info = Information::with(['rZh'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get();
$agenda = Agenda::with(['rZh'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get(); $agenda = Agenda::with(['rZh'])->where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->get();
$slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get(); $slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment