]> BookStack Code Mirror - bookstack/blob - app/Auth/Permissions/JointPermission.php
Update Dutch password_hint translation to correspond with validation rule
[bookstack] / app / Auth / Permissions / JointPermission.php
1 <?php namespace BookStack\Auth\Permissions;
2
3 use BookStack\Auth\Role;
4 use BookStack\Entities\Entity;
5 use BookStack\Model;
6
7 class JointPermission extends Model
8 {
9     public $timestamps = false;
10
11     /**
12      * Get the role that this points to.
13      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
14      */
15     public function role()
16     {
17         return $this->belongsTo(Role::class);
18     }
19
20     /**
21      * Get the entity this points to.
22      * @return \Illuminate\Database\Eloquent\Relations\MorphOne
23      */
24     public function entity()
25     {
26         return $this->morphOne(Entity::class, 'entity');
27     }
28 }