示例#1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $policy = StaticPage::with(['pageDetails' => function ($query) {
         $query->where('language_code', '=', App::getLocale());
     }])->where('properties', '=', 1)->firstOrFail();
     return view('privacypolicy', compact('policy'));
 }
示例#2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $app_language = new AppLanguage();
     $list_pages = StaticPage::with(['pageDetails' => function ($query) {
         $query->where('language_code', '=', AppLanguage::getDefaultLanguage());
     }])->get();
     return view('admin.staticpage.index', compact('list_pages', 'app_language'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // Get static page
     $offshore_dev = StaticPage::with(['pageDetails' => function ($query) {
         $query->where('language_code', '=', App::getLocale());
     }])->where('properties', '=', 3)->firstOrFail();
     $laboratory = StaticPage::with(['pageDetails' => function ($query) {
         $query->where('language_code', '=', App::getLocale());
     }])->where('properties', '=', 4)->firstOrFail();
     $package = StaticPage::with(['pageDetails' => function ($query) {
         $query->where('language_code', '=', App::getLocale());
     }])->where('properties', '=', 5)->firstOrFail();
     return view('offshore-development', compact('offshore_dev', 'laboratory', 'package'));
 }
示例#4
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // Get history
     $list_histories = Timeline::with(['timelineDetails' => function ($query) {
         $query->where('language_code', '=', App::getLocale());
     }])->orderBy('order', 'asc')->get();
     $about_service = StaticPage::with(['pageDetails' => function ($query) {
         $query->where('language_code', '=', App::getLocale());
     }])->where('properties', '=', 7)->firstOrFail();
     $why_vietnam = StaticPage::with(['pageDetails' => function ($query) {
         $query->where('language_code', '=', App::getLocale());
     }])->where('properties', '=', 8)->firstOrFail();
     $message_ceo = StaticPage::with(['pageDetails' => function ($query) {
         $query->where('language_code', '=', App::getLocale());
     }])->where('properties', '=', 9)->firstOrFail();
     return view('about', compact('list_histories', 'about_service', 'why_vietnam', 'message_ceo'));
 }
示例#5
0
 /**
  * Get the option select static page.
  *
  * @return String option format for select box
  */
 public function selectBoxPage($select_id = '')
 {
     $str_return = '';
     $list_page = StaticPage::with(['PageData' => function ($query) {
         $query->where('language_code', '=', AppLanguage::getDefaultLanguage());
     }])->where('is_active', '=', '1')->get();
     if ($list_page) {
         foreach ($list_page as $page) {
             foreach ($page->PageData as $info_page) {
                 $page_id = $page->id;
                 if ($page_id == $select_id) {
                     $attribute_option = 'selected';
                 } else {
                     $attribute_option = '';
                 }
                 $str_return .= "<option value='" . $page_id . "' " . $attribute_option . '>' . $info_page->page_title . '</option>';
             }
         }
     }
     return $str_return;
 }