File manager - Edit - /home/autoph/public_html/projects/aha-api/database/seeders/UserSeeder.php
Back
<?php namespace Database\Seeders; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Str; use Illuminate\Database\Seeder; class UserSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { \App\Models\User::factory()->create([ 'first_name' => 'Super', 'last_name' => 'Admin', 'name' => 'SuperAdmin', 'username' => 'admin', 'email' => 'admin@example.com', 'password' => Hash::make('password'), 'default_dealership_id' => 1, 'email_verified_at' => now(), 'remember_token' => Str::random(10), 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\User::factory()->create([ 'first_name' => 'Demo', 'last_name' => 'Admin', 'name' => 'Demo Admin', 'username' => 'demo', 'email' => 'demo@example.com', 'default_dealership_id' => 1, 'password' => Hash::make('password'), 'email_verified_at' => now(), 'remember_token' => Str::random(10), 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\RoleGroup::create([ 'id' => 1, 'name' => 'Super Admin', 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\RoleGroup::create([ 'id' => 2, 'name' => 'Admin', 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\RoleGroup::create([ 'id' => 3, 'name' => 'Customer', 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\RoleGroup::create([ 'id' => 4, 'name' => 'DCRC', 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\RoleGroup::create([ 'id' => 5, 'name' => 'Service Advisor', 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\RoleGroup::create([ 'id' => 6, 'name' => 'Technician', 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\RoleGroup::create([ 'id' => 7, 'name' => 'Security Guard', 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\RoleGroup::create([ 'id' => 8, 'name' => 'CRM', 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\Role::create([ 'id' => 1, 'name' => 'Super Admin', 'group_id' => 1, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\Role::create([ 'id' => 2, 'name' => 'Admin', 'group_id' => 2, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\Role::create([ 'id' => 3, 'name' => 'Customer', 'group_id' => 3, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\Role::create([ 'id' => 4, 'name' => 'DCRC Ford', 'group_id' => 4, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\Role::create([ 'id' => 5, 'name' => 'SA Ford', 'group_id' => 5, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\Role::create([ 'id' => 6, 'name' => 'Technician Ford', 'group_id' => 6, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\Role::create([ 'id' => 7, 'name' => 'Security FGC', 'group_id' => 7, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\UserRole::create([ 'role_id' => 1, 'user_id' => 1, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\UserRole::create([ 'role_id' => 2, 'user_id' => 2, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\UserRole::create([ 'role_id' => 3, 'user_id' => 3, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\UserRole::create([ 'role_id' => 4, 'user_id' => 4, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\UserRole::create([ 'role_id' => 5, 'user_id' => 5, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\UserRole::create([ 'role_id' => 6, 'user_id' => 6, 'created_at' => now(), 'updated_at' => now(), ]); \App\Models\UserRole::create([ 'role_id' => 7, 'user_id' => 7, 'created_at' => now(), 'updated_at' => now(), ]); } }
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings