dwarfhq / laravel-meilitools

Additional tools for Laravel Scout 9+ integration with MeiliSearch
MIT License
99 stars 9 forks source link

guess namespaces using configured paths #4

Closed macbookandrew closed 1 year ago

macbookandrew commented 2 years ago

Before, you have to specify the fully-qualified class name either in the prompt or in the follow-up question:

php artisan meili:model:details \\App\\Models\\Product
php artisan meili:model:reset \\App\\Models\\Product
php artisan meili:model:synchronize \\App\\Models\\Product

After, it finds the class name using the configured paths in config('meilitools.paths'), so only the short name is necessary:

php artisan meili:model:details Product
php artisan meili:model:reset Product
php artisan meili:model:synchronize Product

Of course, a fully-qualified class name is still accepted and works.

FrittenKeeZ commented 1 year ago

@macbookandrew I like the addition, but chose to keep the actions free of guessing