| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace Database\Seeders;
- use App\Models\User;
- // use Illuminate\Database\Console\Seeds\WithoutModelEvents;
- use Illuminate\Database\Seeder;
- class DatabaseSeeder extends Seeder
- {
- /**
- * Seed the application's database.
- */
- public function run(): void
- {
- User::create([
- 'login' => 'Admin',
- 'email' => 'admin@example.com',
- 'full_name' => 'Администратор',
- 'phone' => '8(999)111-11-11',
- 'password' => Hash::make('KorokNET'),
- ]);
- User::create([
- 'login' => 'Admin',
- 'email' => 'admin@example.com',
- 'full_name' => 'Администратор',
- 'phone' => '8(999)111-11-11',
- 'password' => Hash::make('KorokNET'),
- ]);
- $courses = [
- [
- "name" => 'Алгоритмизация',
- "description" => 'Алгоритмизация',
- "price" => 15000,
- ],
- [
- "name" => 'Базы данных',
- "description" => 'Базы данных',
- "price" => 15000,
- ],
- [
- "name" => 'дизайн',
- "description" => 'дизайн',
- "price" => 15000,
- ],
- ];
- foreach ($courses as $course) {
- Course::create($course);
- }
- }
- }
|