made-foryou / laravel-nova-news

A resource tool for Laravel Nova which adds content management features for managing news posts.
MIT License
2 stars 0 forks source link

Class "Orchestra\Testbench\Factories\UserFactory" not found #20

Open cschalenborgh opened 1 year ago

cschalenborgh commented 1 year ago

https://github.com/made-foryou/laravel-nova-news/blob/b57dc5aac27edda61eb610f9bf98695f2a976747/database/factories/PostFactory.php#L38

This line is failing for me since I don't have this dependency.

  Error

  Class "Orchestra\Testbench\Factories\UserFactory" not found

  at vendor/bondgenoot/laravel-nova-news/database/factories/PostFactory.php:38
mennotempelaar commented 1 year ago

@cschalenborgh Thanks for your issue. I'm currently testing to remove the author_id since it's a nullable field.

Did not know people we're using this package :p. Maybe I should start to work on this package again.

I'll push a bugfix today.

mennotempelaar commented 1 year ago

@cschalenborgh May I ask where you are using PostFactory?

The PostFactory is used only within the tests of the package. To run the tests, you also need the dev dependencies of the package. This also installs the orchestra/testbench package with the UserFactory class.