lorisleiva / laravel-actions

⚡️ Laravel components that take care of one specific task
https://laravelactions.com
MIT License
2.52k stars 124 forks source link

You must call one of in() or append() methods before iterating over a Finder. #291

Open itsmill3rtime opened 2 months ago

itsmill3rtime commented 2 months ago

In the latest versions of Laravel, if you install the Actions package and register in your app service provider boot method Actions::registerCommands();, it will return a LogicException: "You must call one of in() or append() methods before iterating over a Finder." IF you do not have any actions created yet and you try to run any artist commands, composer installs, etc. It tries to iterate on the Actions folder but it doesn't not exist yet.

I will say that i am on windows, so that may behave differently than linux/mac for this scenario. But as soon as i have the actions folder i can then do the registerCommands() and it will work fine when i try to run any artisan command

ahosker commented 2 months ago

I'm getting the same error.

image

xaamin commented 1 month ago

Create an Actions path inside app/ to ride off this error, that worked for me.