Commit 3a1c4f73 by Aan Choesni Herlingga

show footer front page

parent 6e3ee5a3
...@@ -23,40 +23,44 @@ class FrontController extends Controller ...@@ -23,40 +23,44 @@ class FrontController extends Controller
if (Session::get('selected_language') == 'id') { if (Session::get('selected_language') == 'id') {
$data = $this->getDataId($setting); $data = $this->getDataId($setting);
return view('webprofile.front.' . $setting['theme'] . '.index', $data);
} else if (Session::get('selected_language') == 'en') { return view('webprofile.front.'.$setting['theme'].'.index', $data);
} elseif (Session::get('selected_language') == 'en') {
$data = $this->getDataEn($setting); $data = $this->getDataEn($setting);
return view('webprofile.front.' . $setting['theme'] . '.en.index', $data);
return view('webprofile.front.'.$setting['theme'].'.en.index', $data);
} }
} }
private function getDataId($setting) private function getDataId($setting)
{ {
$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']);
$resend = Posts::where('post_status', '1')->orderby('post_date', 'desc')->limit('5')->get(); $resend = Posts::where('post_status', '1')->orderby('post_date', 'desc')->limit('5')->get();
$hot = Posts::where('post_status', '1')->orderby('viewer', 'desc')->limit('5')->get(); $hot = Posts::where('post_status', '1')->orderby('viewer', 'desc')->limit('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();
$slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get(); $slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get();
$menu = Menu::orderby('urutan', 'asc')->get(); $menu = Menu::orderby('urutan', 'asc')->get();
$gallery = Gallery::where('is_active', '1')->orderBy('created_at', 'asc')->limit('4')->get(); $gallery = Gallery::where('is_active', '1')->orderBy('created_at', 'asc')->limit('4')->get();
$quote = Design::where('name_design', 'quote')->get(); $quote = Design::where('name_design', 'quote')->get();
$widget_right = Design::where('name_design', 'widget_right')->orderBy('urutan', 'ASC')->get(); $widget_right = Design::where('name_design', 'widget_right')->orderBy('urutan', 'ASC')->get();
$widget_left = Design::where('name_design', 'widget_left')->orderBy('urutan', 'ASC')->get(); $widget_left = Design::where('name_design', 'widget_left')->orderBy('urutan', 'ASC')->get();
$body = Design::where('name_design', 'body')->get(); $body = Design::where('name_design', 'body')->get();
$footer = Design::where('name_design', 'like', '%footer_row%')->get();
$data = [ $data = [
'posts' => $posts, 'posts' => $posts,
'resend' => $resend, 'resend' => $resend,
'hot' => $hot, 'hot' => $hot,
'info' => $info, 'info' => $info,
'slider' => $slider, 'slider' => $slider,
'menu' => $menu, 'menu' => $menu,
'gallery' => $gallery, 'gallery' => $gallery,
'quote' => $quote, 'quote' => $quote,
'widget_right' => $widget_right, 'widget_right' => $widget_right,
'widget_left' => $widget_left, 'widget_left' => $widget_left,
'body' => $body, 'body' => $body,
'setting' => $setting, 'setting' => $setting,
'footer' => $footer,
]; ];
return $data; return $data;
...@@ -64,31 +68,31 @@ class FrontController extends Controller ...@@ -64,31 +68,31 @@ 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('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('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();
$slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get(); $slider = Slider::where('is_active', '1')->orderby('created_at', 'desc')->get();
$menu = Menu::with(['rEn'])->orderby('urutan', 'asc')->get(); $menu = Menu::with(['rEn'])->orderby('urutan', 'asc')->get();
$gallery = Gallery::where('is_active', '1')->orderBy('created_at', 'asc')->limit('4')->get(); $gallery = Gallery::where('is_active', '1')->orderBy('created_at', 'asc')->limit('4')->get();
$quote = Design::where('name_design', 'quote')->get(); $quote = Design::where('name_design', 'quote')->get();
$widget_right = Design::where('name_design', 'widget_right')->orderBy('urutan', 'ASC')->get(); $widget_right = Design::where('name_design', 'widget_right')->orderBy('urutan', 'ASC')->get();
$widget_left = Design::where('name_design', 'widget_left')->orderBy('urutan', 'ASC')->get(); $widget_left = Design::where('name_design', 'widget_left')->orderBy('urutan', 'ASC')->get();
$body = Design::where('name_design', 'body')->get(); $body = Design::where('name_design', 'body')->get();
$data = [ $data = [
'posts' => $posts, 'posts' => $posts,
'resend' => $resend, 'resend' => $resend,
'hot' => $hot, 'hot' => $hot,
'info' => $info, 'info' => $info,
'slider' => $slider, 'slider' => $slider,
'menu' => $menu, 'menu' => $menu,
'gallery' => $gallery, 'gallery' => $gallery,
'quote' => $quote, 'quote' => $quote,
'widget_right' => $widget_right, 'widget_right' => $widget_right,
'widget_left' => $widget_left, 'widget_left' => $widget_left,
'body' => $body, 'body' => $body,
'setting' => $setting, 'setting' => $setting,
]; ];
return $data; return $data;
......
<footer id="footer-style-1">
<div class="container">
@foreach($footer->where('name_design', 'footer_row_1') as $footer1)
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
@if($footer1->title_show == 1)
<center><div style="color: white; padding-bottom: 10px; font-size: 16px;">{!! stripslashes($footer1['title_design']) !!}</div></center>
@endif
{!! stripslashes($footer1['value_design']) !!}
</div><!-- end columns -->
@endforeach
@foreach($footer->where('name_design', 'footer_row_2') as $footer2)
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
@if($footer2->title_show == 1)
<center><div style="color: white; padding-bottom: 10px; font-size: 16px;">{!! stripslashes($footer2['title_design']) !!}</div></center>
@endif
{!! stripslashes($footer2['value_design']) !!}
</div><!-- end columns -->
@endforeach
@foreach($footer->where('name_design', 'footer_row_3') as $footer3)
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
@if($footer3->title_show == 1)
<center><div style="color: white; padding-bottom: 10px; font-size: 16px;">{!! stripslashes($footer3['title_design']) !!}</div></center>
@endif
{!! stripslashes($footer3['value_design']) !!}
</div><!-- end columns -->
@endforeach
@foreach($footer->where('name_design', 'footer_row_4') as $footer4)
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
@if($footer4->title_show == 1)
<center><div style="color: white; padding-bottom: 10px; font-size: 16px;">{!! stripslashes($footer4['title_design']) !!}</div></center>
@endif
{!! stripslashes($footer4['value_design']) !!}
</div><!-- end columns -->
@endforeach
</div><!-- end container -->
</footer>
\ No newline at end of file
...@@ -133,8 +133,7 @@ ...@@ -133,8 +133,7 @@
@yield('content') @yield('content')
{{-- @yield('footer') --}} @include('webprofile.front.jollyany.footer')
{{-- @include('webprofile.front.footer') --}}
<div id="copyrights"> <div id="copyrights">
<div class="container"> <div class="container">
......
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