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