Last active
January 18, 2024 19:35
-
-
Save codigoconjuan/0ffec792888b627c67a2abfb5316a261 to your computer and use it in GitHub Desktop.
Categoria Seeder para Laravel 9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'), | |
]); | |
} | |
} |
Muchas gracias profe!!
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
Gracias, profe.