Files
Investidor-V2/database/seeders/DatabaseSeeder.php
T
nala 5e6b32b493
tests / ci (push) Waiting to run
dados do seeder
2026-09-30 13:47:51 +02:00

39 lines
835 B
PHP

<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
class DatabaseSeeder extends Seeder
{
use WithoutModelEvents;
/**
* Seed the application's database.
*/
public function run(): void
{
$this->call(ProductionReferenceSeeder::class);
if (! app()->environment(['local', 'testing'])) {
return;
}
$this->call(InvestMozReferenceSeeder::class);
// User::factory(10)->create();
User::firstOrCreate(
['email' => 'test@example.com'],
[
'name' => 'Test User',
'password' => Hash::make(Str::random(48)),
],
);
}
}