laravel-json-api / laravel

JSON:API for Laravel applications
MIT License
541 stars 41 forks source link

feat: add support to replace model in resource stub #272

Closed RobChatloop closed 7 months ago

RobChatloop commented 7 months ago

To better support phpstan/code discoverability it would be ideal to expose the related model to the resource - this PR just moves the model replacement logic into a trait so that it can be shared by both the schema and resource commands.

I've then updated the resource stub accordingly 👍

lindyhopchris commented 7 months ago

Hi @RobChatloop - hope all is going well at Chatloop! It's Chris G from G4m here :-)

Thanks for the PR. I've updated the tests for the console command for your changes. Will squash merge this now and tag a release.

RobChatloop commented 7 months ago

Cheers @lindyhopchris! Hey!!! Yeah it's nice to be using Laravel again and with some great tooling around 😉