lorisleiva / laravel-actions

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

Update AsController.php #215

Closed ddunford closed 1 year ago

ddunford commented 1 year ago

Using LaravelActions with dingo API causes an exception, as it calls getMiddleware(), which expects an array when using array_merge.

Wulfheart commented 1 year ago

What is dingo API?

ddunford commented 1 year ago

What is dingo API?

https://github.com/api-ecosystem-for-laravel/dingo-api

It allows you to build API's. It calls getMiddleware() and expects an array Laravel controller returns an array.

Your examples show getMiddleware() returns an array anyway, so it makes sense to have the default return an empty array to stop any type issues, like this one.

lorisleiva commented 1 year ago

Hi there 👋

I think that makes sense.

Could you please update the docblocks accordingly as it says it returns void at the moment?

ddunford commented 1 year ago

Updated :)

lorisleiva commented 1 year ago

Thank you!