Mercurial > packages > magicforger
comparison src/Generator/Factory/stubs/factory.stub @ 35:55d2e5c5dad9 ls_dev_2025_09
Working on the factory, it's in a semi working state but obviously not complete
| author | Luka Sitas <sitas.luka.97@gmail.com> |
|---|---|
| date | Thu, 11 Sep 2025 21:25:51 -0400 |
| parents | |
| children | 76584181267a |
comparison
equal
deleted
inserted
replaced
| 34:f65ab84ee47f | 35:55d2e5c5dad9 |
|---|---|
| 1 <?php | |
| 2 | |
| 3 namespace Database\Factories; | |
| 4 | |
| 5 use App\Models\{{ modelName }}; | |
| 6 use Illuminate\Database\Eloquent\Factories\Factory; | |
| 7 use Illuminate\Support\Facades\Hash; | |
| 8 use Illuminate\Support\Str; | |
| 9 | |
| 10 /** | |
| 11 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\{{ modelName }}> | |
| 12 */ | |
| 13 class {{ class }} extends Factory | |
| 14 { | |
| 15 | |
| 16 /** | |
| 17 * The name of the factory's corresponding model. | |
| 18 * | |
| 19 * @var class-string<\Illuminate\Database\Eloquent\Model> | |
| 20 */ | |
| 21 protected $model = {{ modelName }}::class; | |
| 22 | |
| 23 /** | |
| 24 * Define the model's default state. | |
| 25 * | |
| 26 * @return array<string, mixed> | |
| 27 */ | |
| 28 public function definition(): array | |
| 29 { | |
| 30 return [ | |
| 31 # {{ factoryInsertPoint }} | |
| 32 ]; | |
| 33 } | |
| 34 | |
| 35 } |
