Browse Source

FIX SUBSCRIBER database

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

+ 7
- 7
app/Http/Controllers/Controller.php View File

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

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


return $subscriber;

Loading…
Cancel
Save