Added Breeze
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\ORM\ContactRole;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
User::factory()->create([
|
||||
'name' => 'Tester',
|
||||
'email' => 'test@ledstarband.ru'
|
||||
]);
|
||||
|
||||
$tech_contact_role_id = ContactRole::Select('id')->where('name', 'tech')->first()->id;
|
||||
$org_contact_role_id = ContactRole::Select('id')->where('name', 'org')->first()->id;
|
||||
|
||||
User::insert([
|
||||
[
|
||||
'name' => 'Антон',
|
||||
'last_name' => 'Михайлов',
|
||||
'email' => 'anthony@ledstarband.ru',
|
||||
'vk_id' => 'blacksnowman',
|
||||
'phone' => '+7 (926) 703-45-74',
|
||||
'img_small' => 'anton_120.png',
|
||||
'img_large' => 'anton_500.png',
|
||||
'use_as_contact' => true,
|
||||
'contact_role' => $tech_contact_role_id,
|
||||
],
|
||||
[
|
||||
'name' => 'Марина',
|
||||
'last_name' => 'Синельникова',
|
||||
'email' => 'marina@ledstarband.ru',
|
||||
'vk_id' => 'marina_kudryavaya',
|
||||
'phone' => '+7 (926) 651-50-69',
|
||||
'img_small' => 'marina_120.png',
|
||||
'img_large' => 'marina_500.png',
|
||||
'use_as_contact' => true,
|
||||
'contact_role' => $org_contact_role_id,
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user