Commit dae7a992 by Bagus Pambudi

limit post home

parent c6c05707
......@@ -47,7 +47,7 @@ class FrontController extends Controller
private function getDataId($setting)
{
$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($setting['post_home']);
$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();
$hot = Posts::where('post_status', '1')->orderby('viewer', 'desc')->limit(isset($setting['limit_populer'])?$setting['limit_terkini']:'5')->get();
$info = Information::where('info_status', '1')->where('event_date', '>=', date('Y-m-d'))->orderby('event_date', 'asc')->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