Carga inicial
This commit is contained in:
69
database/seeds/PreguntasRespuestasNuevasTableSeeder.php
Normal file
69
database/seeds/PreguntasRespuestasNuevasTableSeeder.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class PreguntasRespuestasNuevasTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('preguntas_domestico')->insert([
|
||||
[
|
||||
'nombre' => 'Comentarios:',
|
||||
'orden' => 12,
|
||||
'mostrar_numero' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]
|
||||
]);
|
||||
|
||||
DB::table('preguntas_empresarial')->insert([
|
||||
[
|
||||
'nombre' => 'Comentarios:',
|
||||
'orden' => 13,
|
||||
'mostrar_numero' => 0,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
]
|
||||
]);
|
||||
|
||||
DB::table('respuestas_domestico')->insert([
|
||||
|
||||
//Respuesta 12
|
||||
[
|
||||
'nombre' => '',
|
||||
'pregunta_id' => 12,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Texto',
|
||||
'puntuacion' => null,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
|
||||
DB::table('respuestas_empresarial')->insert([
|
||||
|
||||
//Respuesta 13
|
||||
[
|
||||
'nombre' => '',
|
||||
'pregunta_id' => 13,
|
||||
'orden' => 1,
|
||||
'tipo_campo' => 'Texto',
|
||||
'puntuacion' => null,
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString(),
|
||||
],
|
||||
]);
|
||||
|
||||
\App\Models\RespuestaDomestico::where('pregunta_id',1)->delete();
|
||||
\App\Models\PreguntaDomestico::where('id',1)->delete();
|
||||
|
||||
\App\Models\RespuestaEmpresarial::where('pregunta_id',2)->delete();
|
||||
\App\Models\PreguntaEmpresarial::where('id',2)->delete();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user