Mercurial > packages > magicforger
view src/Generator/Factory/stubs/factory.stub @ 36:76584181267a ls_dev_2025_09
Got factories working in a basic way, not sure how complex tables will handle it though
| author | Luka Sitas <sitas.luka.97@gmail.com> |
|---|---|
| date | Sat, 20 Sep 2025 17:14:29 -0400 |
| parents | 55d2e5c5dad9 |
| children |
line wrap: on
line source
<?php namespace Database\Factories; use {{ namespacedModel }}; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Str; /** * @extends \Illuminate\Database\Eloquent\Factories\Factory<{{ namespacedModel }}> */ class {{ class }} extends Factory { /** * The name of the factory's corresponding model. * * @var class-string<\Illuminate\Database\Eloquent\Model> */ protected $model = {{ model }}::class; /** * Define the model's default state. * * @return array<string, mixed> */ public function definition(): array { return [ # {{ factoryInsertPoint }} ]; } }
