TestPostFactory.php 476 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Knuckles\Scribe\Tests\Fixtures;
  3. use Illuminate\Database\Eloquent\Factories\Factory;
  4. class TestPostFactory extends Factory
  5. {
  6. protected $model = TestPost::class;
  7. public function definition(): array
  8. {
  9. return [
  10. 'id' => 1,
  11. 'title' => 'Test title',
  12. 'body' => 'random body',
  13. ];
  14. }
  15. public function pivotTags(): array
  16. {
  17. return [
  18. 'priority' => "high"
  19. ];
  20. }
  21. }