Exemple #1
0
 /**
  * Create a new controller instance.
  *
  * @return void
  */
 public function index(Request $request)
 {
     $email = Option::where('key', 'contact.email')->first()->value;
     $phone = Option::where('key', 'contact.phone')->first()->value;
     $slogan = Option::where('key', 'site.slogan')->first()->value;
     $social_links = array('facebook' => Option::where('key', 'facebook.link')->first()->value, 'twitter' => Option::where('key', 'twitter.link')->first()->value, 'youtube' => Option::where('key', 'youtube.link')->first()->value, 'linkedin' => Option::where('key', 'linkedin.link')->first()->value, 'instagram' => Option::where('key', 'instagram.link')->first()->value);
     $data = array('services' => Service::orderBy('sort_order')->get(), 'clients' => Client::orderBy('sort_order')->get(), 'photos' => Photo::orderBy('sort_order')->get(), 'email' => $email, 'phone' => $phone, 'slogan' => $slogan, 'social_links' => $social_links);
     return view('home', $data);
 }
 /**
  * Create a new controller instance.
  *
  * @return void
  */
 public function index(Request $request)
 {
     $email = Option::where('key', 'contact.email')->first()->value;
     $phone = Option::where('key', 'contact.phone')->first()->value;
     $company_data = array('name' => Option::where('key', 'company.name')->first()->value, 'address' => nl2br(Option::where('key', 'company.address')->first()->value), 'legal_left' => nl2br(Option::where('key', 'company.legal.left')->first()->value), 'legal_right' => nl2br(Option::where('key', 'company.legal.right')->first()->value));
     $social_links = array('facebook' => Option::where('key', 'facebook.link')->first()->value, 'twitter' => Option::where('key', 'twitter.link')->first()->value, 'youtube' => Option::where('key', 'youtube.link')->first()->value, 'linkedin' => Option::where('key', 'linkedin.link')->first()->value, 'instagram' => Option::where('key', 'instagram.link')->first()->value);
     $data = array('photos' => Photo::orderBy('sort_order')->get(), 'email' => $email, 'phone' => $phone, 'social_links' => $social_links, 'company_data' => $company_data);
     return view('contact', $data);
 }