| @@ -120,17 +120,9 @@ class Controller extends BaseController | |||
| public function getDatabase(Request $request) | |||
| { | |||
| $subscriber = Subscriber::groupBy('city')->get(); | |||
| $city = array(); | |||
| foreach ($subscriber as $key => $s) { | |||
| # code... | |||
| array_push($city, array( | |||
| 'city' => $s->city | |||
| )); | |||
| } | |||
| return $city; | |||
| $subscriber = Subscriber::where('city',$request->city)->get(); | |||
| return $subscriber; | |||
| } | |||
| } | |||