Ejemplo n.º 1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $channels = Request::has('country') ? Channel::where('country_id', Request::get('country'))->where('user_id', '<>', Auth::id())->get() : Channel::where('user_id', '<>', Auth::id())->get();
     return Response::json(['ok' => $channels->load(['user.userProfile', 'country'])]);
 }