/** * Display a listing of contacts * * @param Request $request * * @return \Illuminate\View\View */ public function index(Request $request) { $contacts = Contacts::site_access()->leftJoin('sitelanguages', 'sitelanguages.id', '=', 'contacts.sitelanguages_id')->join('sites', 'sites.id', '=', 'sitelanguages.sites_id')->join('languages', 'languages.id', '=', 'sitelanguages.languages_id')->select('contacts.*', \DB::raw(' CONCAT(sites.title, \'-\',languages.code) as site_language'))->get(); return view('admin.contacts.index', compact('contacts')); }