Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
Last active January 18, 2024 19:35
Show Gist options
  • Save codigoconjuan/0ffec792888b627c67a2abfb5316a261 to your computer and use it in GitHub Desktop.
Save codigoconjuan/0ffec792888b627c67a2abfb5316a261 to your computer and use it in GitHub Desktop.
Categoria Seeder para Laravel 9
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class CategoriasSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('categorias')->insert([
'categoria' => 'Backend Developer',
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s'),
]);
DB::table('categorias')->insert([
'categoria' => 'Front end Developer',
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s'),
]);
DB::table('categorias')->insert([
'categoria' => 'Mobile Developer',
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s'),
]);
DB::table('categorias')->insert([
'categoria' => 'Techlead',
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s'),
]);
DB::table('categorias')->insert([
'categoria' => 'UX / UI Design',
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s'),
]);
DB::table('categorias')->insert([
'categoria' => 'Software Architecture',
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s'),
]);
DB::table('categorias')->insert([
'categoria' => 'Devops',
'created_at' => date('Y-m-d H:i:s'),
'updated_at' => date('Y-m-d H:i:s'),
]);
}
}
@ERKLLSAN
Copy link

ERKLLSAN commented Feb 9, 2023

Gracias, profe.

@CapiDeveloper
Copy link

Muchas gracias profe!!

@JeanGracia
Copy link

ahora intentare hacerlo solo antes de ver el video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment