knuckleswtf / scribe

Generate API documentation for humans from your Laravel codebase.✍
https://scribe.knuckles.wtf/laravel/
MIT License
1.58k stars 280 forks source link

Couldn't get example model for ...Models\UserTerm via factoryCreate. #784

Closed yormy closed 3 months ago

yormy commented 5 months ago

Scribe version

4.29

PHP version

8.1

Framework

Laravel

Framework version

10

Scribe config

When I generate docs it mentions 't get example model for ...Models\UserTerm via factoryCreate.`` in yellow as a warning. However the resulted static docs do contain the generated model data.

Any ideas?

What happened?

..

Docs

ceejayoz commented 5 months ago

In php artisan tinker, do App\Models\UserTerm::factory()->create(). Do you get an error when doing so?

shalvah commented 3 months ago

I think it's just an emitted warning. If you have your examples.models_source config looking like this, for instance: ['factoryCreate', 'factoryMake', 'databaseFirst'], Scribe will try the next strategy if the previous one fails; that's probably why it still "works". If that's fine with you, then there's no problem.