2022-07-07 17:14:40 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Seeders;
|
|
|
|
|
|
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
2022-07-08 16:21:20 +08:00
|
|
|
|
2022-07-08 17:04:09 +08:00
|
|
|
|
|
|
|
use App\Models\Link;
|
2022-07-08 16:21:20 +08:00
|
|
|
|
2022-07-07 17:14:40 +08:00
|
|
|
class DatabaseSeeder extends Seeder
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Seed the application's database.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
// \App\Models\User::factory(10)->create();
|
|
|
|
|
2022-07-08 17:04:09 +08:00
|
|
|
// \App\Models\User::factory()->create([
|
|
|
|
// 'name' => Str::random(10),
|
|
|
|
// 'email' => Str::random(10).'@gmail.com',
|
|
|
|
// 'password' => Hash::make('password')
|
|
|
|
// ]);
|
2022-07-08 16:21:20 +08:00
|
|
|
// $user=new User;
|
|
|
|
// $user->name=Str::random(10);
|
|
|
|
// $user->email=Str::random(10).'@gmail.com';
|
|
|
|
// $user->password=Hash::make('password');
|
|
|
|
// $user->save();
|
2022-07-08 17:04:09 +08:00
|
|
|
$this->call([
|
|
|
|
LinkSeeder::class
|
|
|
|
]);
|
2022-07-07 17:14:40 +08:00
|
|
|
}
|
|
|
|
}
|