File manager - Edit - /var/www/html/portal/database/seeders/CamaraMunicipalSeeder.php
Back
<?php namespace Database\Seeders; use Illuminate\Database\Seeder; use App\Models\Structure; use Illuminate\Support\Str; class CamaraMunicipalSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { // Verificar se já existe $camara = Structure::where('abbreviation', 'CMAR') ->orWhere('name', 'like', '%Câmara Municipal%') ->first(); if ($camara) { $this->command->info('Câmara Municipal já existe no banco: ' . $camara->name); return; } // Criar Câmara Municipal Structure::create([ 'id' => Str::uuid(), 'type' => 'AUTARQUIA', 'name' => 'Câmara Municipal de Angra dos Reis', 'abbreviation' => 'CMAR', 'slug' => 'camara-municipal-de-angra-dos-reis', 'address' => 'Rua do Comércio, s/n, Centro, Angra dos Reis - RJ', 'phoneNumber' => '(24) 2404-1713', 'email1' => 'sti@angradosreis.rj.leg.br', 'pronunciation' => 'PRESIDENTE', 'manager' => 'Câmara Municipal', 'status' => 'ATIVADO', ]); $this->command->info('✅ Câmara Municipal de Angra dos Reis (CMAR) criada com sucesso!'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.18 |
proxy
|
phpinfo
|
Settings