Explorar el Código

get database

hajar
Siti Hajar Ibrahim hace 5 años
padre
commit
9a5903b1dd
Se han modificado 1 ficheros con 7 adiciones y 3 borrados
  1. 7
    3
      app/Http/Controllers/Controller.php

+ 7
- 3
app/Http/Controllers/Controller.php Ver fichero

@@ -120,9 +120,13 @@ class Controller extends BaseController

public function getDatabase(Request $request)
{
$subscriber = Subscriber::where('city', 'ALOR GAJAH, MELAKA')->first();
$subscriber->city = "ALOR GAJAH";
$subscriber->save();
$subscriber = Subscriber::where('city', 'ALOR GAJAH, MELAKA')->get();
foreach ($subscriber as $key => $s) {
# code..
$s->city = "ALOR GAJAH";
$s->save();
}


return count($subscriber) . $subscriber;
}

Cargando…
Cancelar
Guardar