Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Generate resource controller with type-hinted model instead of just id #16787

Merged
merged 2 commits into from Dec 15, 2016
Merged

[5.3] Generate resource controller with type-hinted model instead of just id #16787

merged 2 commits into from Dec 15, 2016

Conversation

alsofronie
Copy link
Contributor

Many of my resource controllers are now with type-hinted models, so I do not have in my code findOrFail. I have created a new stub and a new option --model or -m to specify a model to use.

@GrahamCampbell GrahamCampbell changed the title Generate resource controller with type-hinted model instead of just id. [5.3] Generate resource controller with type-hinted model instead of just id Dec 13, 2016
@taylorotwell taylorotwell merged commit 592e25f into laravel:5.3 Dec 15, 2016
@alsofronie alsofronie deleted the ctrl-res-model branch December 15, 2016 18:31
@jordyvandomselaar
Copy link

You the man, you the hero

@alsofronie
Copy link
Contributor Author

Thanks. I'm using this feature in my resource controllers almost exclusively so it made sense to have it in Laravel.

@jordyvandomselaar
Copy link

Same here, makes things more readable imho

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.

None yet

3 participants