Testing Alpha

This commit is contained in:
2025-05-11 14:14:50 -06:00
parent 988b86a33d
commit a7002701f5
1903 changed files with 77534 additions and 36485 deletions

View File

@ -0,0 +1,33 @@
# 🧱 Cómo crear un nuevo Seeder compatible
## 1. Crear el Seeder
```php
class ProductoSeeder extends AbstractDataSeeder
{
use HasSeederFactorySupport;
use HandlesFileSeeders;
public function run(array $config = []): void
{
$this->seedFromJson('productos.json');
}
public function runFake(int $total, array $config = []): void
{
Producto::factory()->count($total)->create();
}
}
```
## 2. Registrar en `config/seeder.php`
```php
'products' => [
'enabled' => true,
'seeder' => ProductoSeeder::class,
'file' => 'products.json',
'faker_only' => false,
'fake' => ['min' => 5, 'max' => 100],
],
```