Home
Sign Up
Sign In
V2EX
›
问与答
Laravel ORM 如何自动 WHERE user_id ?
kslr
·
Oct 9, 2017
· 1588 views
This topic created in 3245 days ago, the information mentioned may be changed or developed.
很多表都有 user_id 字段,但是每次都要 where 一次,很烦。
所以,有什么方法可以自动实现验证用户吗?
user_id
Where
orm
laravel
1 replies
•
2017-10-09 13:21:51 +08:00
1
mandex
Oct 9, 2017
1
https://d.laravel-china.org/docs/5.5/eloquent#query-scopes
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
2963 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 42ms ·
UTC 01:38
·
PVG 09:38
·
LAX 18:38
·
JFK 21:38
♥ Do have faith in what you're doing.
❯