Files
Verde-Web/create_admin.php

17 lines
449 B
PHP

<?php
$tenant = App\Models\Tenant::first() ?? App\Models\Tenant::factory()->create();
$user = App\Models\User::firstOrCreate(
['email' => 'admin@lgu.com'],
[
'role' => 'admin',
'password' => bcrypt('password'),
'tenant_id' => $tenant->id,
'first_name' => 'LGU',
'last_name' => 'Admin'
]
);
echo "Email: " . $user->email . "\n";
echo "Password: password\n";
echo "LGU: " . $tenant->name . "\n";