'mpba-limited'], [ 'uuid' => (string) Str::uuid(), 'name' => 'MPBA Limited', 'status' => 'active', 'timezone' => 'Europe/London', 'is_system_company' => true, 'billing_email' => 'mark.gregory@mpba.co.uk', ], ); $user = User::updateOrCreate( ['email' => 'mark.gregory@mpba.co.uk'], [ 'company_id' => $company->id, 'name' => 'Mark Gregory', 'password' => Hash::make('987400Kmh'), 'is_platform_admin' => true, 'is_company_admin' => true, 'status' => 'active', 'email_verified_at' => now(), ], ); $user->assignRole($role); $user = User::updateOrCreate( ['email' => 'david.price@mpba.co.uk'], [ 'company_id' => $company->id, 'name' => 'David Price', 'password' => Hash::make('Password1'), 'is_platform_admin' => true, 'is_company_admin' => true, 'status' => 'active', 'email_verified_at' => now(), ], ); $user->assignRole($role); $warehouse = Warehouse::firstOrNew([ 'company_id' => $company->id, 'code' => 'MPBA-MAIN', ]); $warehouse->forceFill([ 'uuid' => $warehouse->uuid ?: (string) Str::uuid(), 'name' => 'MPBA Main Warehouse', 'status' => 'active', 'timezone' => 'Europe/London', ])->save(); WarehouseValidationRule::updateOrCreate( ['warehouse_id' => $warehouse->id, 'rule_key' => 'stock.location.required'], ['name' => 'Stock location required', 'severity' => 'error', 'is_active' => true, 'configuration' => ['required' => true]], ); } }