File manager - Edit - /var/www/html/homologBancodetalentos/database/seeders/LocalTestUserSeeder.php
Back
<?php namespace Database\Seeders; use App\Models\TalentBank\Candidate; use App\Models\TalentBank\Company; use App\Models\TalentBank\Ethnicity; use App\Models\TalentBank\Gender; use App\Models\TalentBank\Neighbourhood; use App\Models\TalentBank\Occupation; use App\Models\User; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\Hash; class LocalTestUserSeeder extends Seeder { public function run(): void { $email = 'usuario.teste.local@bt.local'; $password = 'Teste@123'; User::query()->updateOrCreate( ['email' => $email], [ 'name' => 'Usuario Teste Local', 'password' => Hash::make($password), ] ); $neighbourhoodId = Neighbourhood::query()->value('id'); $occupationId = Occupation::query()->value('id'); $genderId = Gender::query()->value('id'); $ethnicityId = Ethnicity::query()->value('id'); Candidate::query()->updateOrCreate( ['cpf' => '12345678909'], [ 'name' => 'Candidato Teste Local', 'email' => $email, 'active' => true, 'neighbourhood_id' => $neighbourhoodId, 'occupation_id' => $occupationId, 'gender_id' => $genderId, 'ethnicity_id' => $ethnicityId, ] ); Company::query()->updateOrCreate( ['cnpj' => '12345678000195'], [ 'corporate_name' => 'Empresa Teste Local LTDA', 'trading_name' => 'Empresa Teste Local', 'email' => 'empresa.teste.local@bt.local', 'active' => true, 'neighbourhood_id' => $neighbourhoodId, 'contact_name' => 'Responsavel Teste Local', ] ); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings