Last active
June 20, 2024 23:27
-
-
Save codigoconjuan/080cfbf26cadc96d2a4a043d69bb2da7 to your computer and use it in GitHub Desktop.
SalarioSeeder en 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\Seeder; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Database\Console\Seeds\WithoutModelEvents; | |
class SalarioSeeder extends Seeder | |
{ | |
/** | |
* Run the database seeds. | |
* | |
* @return void | |
*/ | |
public function run() | |
{ | |
DB::table('salarios')->insert([ | |
'salario' => '$0 - $499', | |
'created_at' => date('Y-m-d H:i:s'), | |
'updated_at' => date('Y-m-d H:i:s'), | |
]); | |
DB::table('salarios')->insert([ | |
'salario' => '$500 - $749', | |
'created_at' => date('Y-m-d H:i:s'), | |
'updated_at' => date('Y-m-d H:i:s'), | |
]); | |
DB::table('salarios')->insert([ | |
'salario' => '$750 - $999', | |
'created_at' => date('Y-m-d H:i:s'), | |
'updated_at' => date('Y-m-d H:i:s'), | |
]); | |
DB::table('salarios')->insert([ | |
'salario' => '$1000 - $1499', | |
'created_at' => date('Y-m-d H:i:s'), | |
'updated_at' => date('Y-m-d H:i:s'), | |
]); | |
DB::table('salarios')->insert([ | |
'salario' => '$1500 - $1999', | |
'created_at' => date('Y-m-d H:i:s'), | |
'updated_at' => date('Y-m-d H:i:s'), | |
]); | |
DB::table('salarios')->insert([ | |
'salario' => '$2000 - $2499', | |
'created_at' => date('Y-m-d H:i:s'), | |
'updated_at' => date('Y-m-d H:i:s'), | |
]); | |
DB::table('salarios')->insert([ | |
'salario' => '$2500 - $2999', | |
'created_at' => date('Y-m-d H:i:s'), | |
'updated_at' => date('Y-m-d H:i:s'), | |
]); | |
DB::table('salarios')->insert([ | |
'salario' => '$3000 - $4999', | |
'created_at' => date('Y-m-d H:i:s'), | |
'updated_at' => date('Y-m-d H:i:s'), | |
]); | |
DB::table('salarios')->insert([ | |
'salario' => '+$5000', | |
'created_at' => date('Y-m-d H:i:s'), | |
'updated_at' => date('Y-m-d H:i:s'), | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ya voy por la clase 190 del curso de laravel 9