fix organization seeder
This commit is contained in:
@@ -16,7 +16,7 @@ class OrganizationSeeder extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
$response = Http::get('https://api.primaya.id/temp/organizations');
|
$response = Http::get('https://app.primaya.id/temp/organizations');
|
||||||
|
|
||||||
foreach ($response->json()['organizations'] as $organization) {
|
foreach ($response->json()['organizations'] as $organization) {
|
||||||
$newOrganization = Organization::updateOrCreate([
|
$newOrganization = Organization::updateOrCreate([
|
||||||
@@ -56,7 +56,8 @@ class OrganizationSeeder extends Seeder
|
|||||||
]);
|
]);
|
||||||
$newOrganization->metas()->updateOrCreate([
|
$newOrganization->metas()->updateOrCreate([
|
||||||
'type' => 'timezone',
|
'type' => 'timezone',
|
||||||
],['system' => 'default',
|
], [
|
||||||
|
'system' => 'default',
|
||||||
'type' => 'timezone',
|
'type' => 'timezone',
|
||||||
'value' => $organization['timezone']
|
'value' => $organization['timezone']
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user