add carriers to seeding db
This commit is contained in:
parent
5a5eea3096
commit
34ad065d59
1 changed files with 17 additions and 3 deletions
|
|
@ -6,7 +6,21 @@ $users = [
|
|||
'password' => password_hash('password', PASSWORD_DEFAULT),
|
||||
],
|
||||
];
|
||||
$path = __DIR__.'/../storage/users.json';
|
||||
$data = json_encode($users, JSON_PRETTY_PRINT);
|
||||
|
||||
file_put_contents($path, $data);
|
||||
$carriers = [
|
||||
[
|
||||
'id' => 0,
|
||||
'email' => 'carrier@test.com',
|
||||
'companyName' => 'test Company',
|
||||
],
|
||||
];
|
||||
|
||||
$fileDataMap = [
|
||||
'users.json' => $users,
|
||||
'carriers.json' => $carriers,
|
||||
];
|
||||
|
||||
foreach ($fileDataMap as $file => $data) {
|
||||
$path = __DIR__."/$file";
|
||||
file_put_contents($path, json_encode($data, JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue