Пример #1
0
 public function galeri($account)
 {
     $iletisim = \App\Host::where('subdomain', $account)->first();
     $contact = \App\User::find($iletisim->user_id)->contact;
     $about = \App\User::find($iletisim->user_id)->about;
     $sliders = \App\User::find($iletisim->user_id)->slider;
     $galeri = \App\User::find($iletisim->user_id)->galeri;
     return view('frontend.galeri', compact('contact', 'about', 'sliders', 'galeri'));
 }
Пример #2
0
 public function store(Request $request)
 {
     $host = Host::where('user_id', Auth::user()->id)->first();
     if ($host) {
         $host->subdomain = $request->subdomain;
         $host->domain = $request->name;
         $host->googlecode = $request->google;
         $host->save();
         flash('Güncelleme işlemi başarıyla gercekleşti.', 'info');
         return redirect()->back();
     } else {
         $host = new Host();
         $host->subdomain = $request->subdomain;
         $host->domain = $request->name;
         $host->googlecode = $request->google;
         $host->user_id = Auth::user()->id;
         $host->save();
         flash('Güncelleme işlemi başarıyla gercekleşti.', 'info');
         return redirect()->back();
     }
 }