Explorar el Código

get database

hajar
Siti Hajar Ibrahim hace 5 años
padre
commit
723f52d9ca
Se han modificado 1 ficheros con 4 adiciones y 12 borrados
  1. 4
    12
      app/Http/Controllers/Controller.php

+ 4
- 12
app/Http/Controllers/Controller.php Ver fichero

@@ -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;

}
}

Cargando…
Cancelar
Guardar