Home
Sign Up
Sign In
V2EX
›
问与答
Laravel ORM 如何自动 WHERE user_id ?
kslr
·
Oct 9, 2017
· 1433 views
This topic created in 3139 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
·
Solana
·
5530 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 47ms ·
UTC 08:21
·
PVG 16:21
·
LAX 01:21
·
JFK 04:21
♥ Do have faith in what you're doing.
❯