mirror of
https://github.com/henry4682/finance_app.git
synced 2026-07-16 00:10:00 +00:00
34 lines
767 B
PHP
34 lines
767 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
use WithoutModelEvents;
|
|
|
|
/**
|
|
* Seed the application's database.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
\App\Models\User::updateOrCreate(
|
|
['email' => 'henry194557@gmail.com'], // 換成你的 Google 登入 email
|
|
[
|
|
'name' => 'Henry',
|
|
'google_id' => '', // 可以先隨便填
|
|
'password' => bcrypt('password'),
|
|
]
|
|
);
|
|
|
|
$this->call([
|
|
AccountSeeder::class,
|
|
InvestmentHoldingSeeder::class,
|
|
InvestmentTransactionSeeder::class,
|
|
]);
|
|
}
|
|
}
|