1 | <?php |
||
24 | trait RelationTrait |
||
25 | { |
||
26 | /** |
||
27 | * Role has many users (One-many relationship of User::role). |
||
28 | * |
||
29 | * @return Relations\HasMany |
||
30 | */ |
||
31 | 3 | public function users() |
|
38 | |||
39 | /** |
||
40 | * Role has many users in a project_users. |
||
41 | * |
||
42 | * @return Relations\HasMany |
||
43 | */ |
||
44 | public function projectUsers() |
||
48 | |||
49 | /** |
||
50 | * Role has many role permission. |
||
51 | * |
||
52 | * @return Relations\BelongsToMany |
||
53 | */ |
||
54 | public function permissions() |
||
64 | |||
65 | abstract public function hasMany($related, $foreignKey = null, $localKey = null); |
||
67 | } |
||
68 |