Browse Source

get database

hajar
Siti Hajar Ibrahim 5 years ago
parent
commit
b0a2429d3a
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      app/Http/Controllers/Controller.php

+ 3
- 2
app/Http/Controllers/Controller.php View File



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



Loading…
Cancel
Save