is a many-to-many association.
// 三个表如下
users user_role roles
Now I want to query the name
field of all
roles
How to use Eloquent ORM
to write this related query?
solved. .
User::with('roles')->get();
黄舟2017-05-16 16:57:10
It seems that permission verification needs to be written. It is recommended to use the entrust package. Address: https://github.com/Zizaco/ent...