Skip to content

Conversation

@macaws
Copy link
Contributor

@macaws macaws commented Oct 31, 2025

This simple PR allows users to type commands such as php artisan scout:import User instead of php artisan scout:import "App\\Models\\User" by doing a quick lookup if the user's input is not immediately found.

It seems more in-line with other Artisan CLI commands from Laravel without breaking existing functionality.

I'm not sure if the PHPDoc @throws tag is wanted or not - PHPStorm suggested it after adding a throw. I did need to update the test, since it was excepting an Error class and we now pass a ScoutException, which seems more appropriate in this situation and should be easier for a dev to debug since these commands run within CI/CD, forge deploy scripts, crons, etc.

@github-actions
Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@macaws macaws marked this pull request as ready for review October 31, 2025 20:19
@macaws
Copy link
Contributor Author

macaws commented Oct 31, 2025

Also, this may warrant a docs update

@taylorotwell
Copy link
Member

Can re-submit this without the one-line stuff?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants