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