1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00
laravel-tips/content/tips/be-careful-if-youre-not-scoping-your-route-model-bindings.md
Samuel Štancl 9ff2f9816b Week 28/2022
2022-07-17 20:57:28 +02:00

11 lines
No EOL
583 B
Markdown

---
title: 'Be careful if you''re not scoping your route model bindings '
tweet_id: '1547939806788734976'
thread_slug: weekly-thread-2022-28
author_username: realstevebauman
images:
- 'https://pbs.twimg.com/media/FXoucXVUEAINVm5.jpg'
created_at: 2022-07-15T13:43:03+00:00
slug: be-careful-if-youre-not-scoping-your-route-model-bindings
---
I've caught myself writing this security bug many times in controllers, making the assumption that Laravel will retrieve child route bound models by the parent model *by default*. Be careful if you're not scoping your route model bindings!