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.
29 lines
919 B
29 lines
919 B
11 months ago
|
<?php
|
||
|
|
||
|
namespace Database\Seeders;
|
||
|
|
||
|
use App\Models\Transfer;
|
||
|
use Illuminate\Database\Seeder;
|
||
|
|
||
|
class TransferSeeder extends Seeder
|
||
|
{
|
||
|
/**
|
||
|
* Run the database seeds.
|
||
|
*/
|
||
|
public function run(): void
|
||
|
{
|
||
|
for ($i = 11; $i <= 20; $i++) {
|
||
|
Transfer::create([
|
||
|
'peti_id' => $i, // Assuming you have 1000 petis in the 'petis' table
|
||
|
'name_customer' => $i, // Assuming you have 1000 customers in the 'customers' table
|
||
|
'source_warehouse' => $i, // Assuming you have 4 warehouses in the 'm_warehouses' table
|
||
|
'destination_warehouse' => $i, // Assuming you have 4 warehouses in the 'm_warehouses' table
|
||
|
'date' => now(),
|
||
|
'created_by' => 'Seeder',
|
||
|
'updated_by' => 'Seeder',
|
||
|
'created_at' => now(),
|
||
|
'updated_at' => now(),
|
||
|
]);
|
||
|
}
|
||
|
}
|
||
|
}
|