@php if (session()->get('locale') == null) { $DILLER = App\Models\Panel\Diller::where('varsayilan', 1)->first(); $DIL = $DILLER->kod; // Locale session'da yoksa, session'a yaz ve Laravel'e uygula session()->put('locale', $DIL); App::setLocale($DIL); } else { $DIL = session()->get('locale'); // Session'da varsa da yine Laravel'e set edelim App::setLocale($DIL); } $AYAR=App\Models\Panel\Ayarlar::first(); $ILETISIM=App\Models\Panel\Iletisim::first(); $SOSYAL=App\Models\Panel\SosyalMedya::first(); $TUMDILLER = App\Models\Panel\Diller::where('durum',1) ->where('kod', '!=', $DIL) ->get(); $DIGERDIL = App\Models\Panel\Diller::where('durum',1) ->where('kod', '!=', $DIL) ->first(); $MENULER=App\Models\Panel\Menuler::where('dil',$DIL) ->where('menutip',0) ->where('alan','header') ->where('durum',1) ->orderBy('sira','ASC') ->get(); $BUTONMENUKONTROL = App\Models\Panel\Menuler::where('dil',$DIL) ->where('menutip',2) ->count(); $BUTONMENU = App\Models\Panel\Menuler::where('dil',$DIL) ->where('menutip',2) ->first(); $URUNLERLINK = App\Models\Panel\Linkler::where('dil',$DIL) ->where('seflink','urunler') ->first(); $YATIRIMCI_DOSYALARI = collect(); if (\Illuminate\Support\Facades\Schema::hasTable('yatirimci_dosyalari')) { try { $YATIRIMCI_DOSYALARI = App\Models\Panel\YatirimciDosyalari::where('durum',1) ->orderBy('sira','ASC') ->orderBy('id','ASC') ->get(); } catch (\Throwable $e) { $YATIRIMCI_DOSYALARI = collect(); } } @endphp