aswi2020merlot-gitlab/database/factories/MetadataFactory.php @ 86b3ae27
1 | e765fd91 | Marek Lovčí | <?php
|
---|---|---|---|
2 | |||
3 | /** @var Factory $factory */
|
||
4 | /** @var Faker $faker */
|
||
5 | |||
6 | use App\Artefact; |
||
7 | use App\Metadata; |
||
8 | use Faker\Generator as Faker; |
||
9 | use Illuminate\Database\Eloquent\Factory; |
||
10 | |||
11 | $factory->define(Metadata::class, function ($faker) use ($factory) { |
||
12 | return [ |
||
13 | 'name' => $faker->streetName, |
||
14 | 'noteCZ' => $faker->paragraph, |
||
15 | 'noteEN' => $faker->paragraph, |
||
16 | 'page' => rand(0, 2000), |
||
17 | 'artefact_id' => factory(Artefact::class)->create()->id |
||
18 | ];
|
||
19 | });
|