Beispiel #1
0
 public static function site_list()
 {
     if (GLobalHelp::person()->all_scope == false) {
         return Model\Site::whereHas('users_site_scope', function ($q) {
             $q->where('users_id', '=', GLobalHelp::person()->users_id);
         })->orderBy('name', 'asc')->groupBy('site.name', 'site.site_id')->get();
     } else {
         return Model\Site::where('partner_id', '=', GLobalHelp::person()->partner_id)->orderBy('name', 'asc')->groupBy('site.name', 'site.site_id')->get();
     }
 }