You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
907 B
30 lines
907 B
11 months ago
|
<?php
|
||
|
|
||
|
namespace Database\Seeders;
|
||
|
|
||
|
use App\Models\Disposal;
|
||
|
use Illuminate\Database\Seeder;
|
||
|
|
||
|
class DisposalSeeder extends Seeder
|
||
|
{
|
||
|
/**
|
||
|
* Run the database seeds.
|
||
|
*/
|
||
|
public function run(): void
|
||
|
{
|
||
|
for ($i = 1; $i <= 10; $i++) {
|
||
|
Disposal::create([
|
||
|
'peti_id' => $i, // Assuming you have 1000 petis in the 'petis' table
|
||
|
'customer_id' => $i, // Assuming you have 1000 customers in the 'customers' table
|
||
|
'warehouse_id' => $i, // Assuming you have 4 warehouses in the 'm_warehouses' table
|
||
|
'date_disposal' => now(),
|
||
|
'description' => 'Description',
|
||
|
'status_disposal' => 'INAKTIF',
|
||
|
'created_by' => 'Seeder',
|
||
|
'updated_by' => 'Seeder',
|
||
|
'created_at' => now(),
|
||
|
'updated_at' => now(),
|
||
|
]);
|
||
|
}
|
||
|
}
|
||
|
}
|