]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Permissions/JointPermission.php
Add prev and next button to navigate through different pages
[bookstack] / app / Auth / Permissions / JointPermission.php
index 71c1979fcf579516c6527cacb29c6c1f027ebf14..6f7fa582b83a6610b57813bc009fd44582761ab3 100644 (file)
@@ -1,27 +1,28 @@
 <?php namespace BookStack\Auth\Permissions;
 
-use BookStack\Entities\Entity;
-use BookStack\Model;
 use BookStack\Auth\Role;
+use BookStack\Entities\Models\Entity;
+use BookStack\Model;
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\Relations\MorphOne;
 
 class JointPermission extends Model
 {
+    protected $primaryKey = null;
     public $timestamps = false;
 
     /**
      * Get the role that this points to.
-     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
      */
-    public function role()
+    public function role(): BelongsTo
     {
         return $this->belongsTo(Role::class);
     }
 
     /**
      * Get the entity this points to.
-     * @return \Illuminate\Database\Eloquent\Relations\MorphOne
      */
-    public function entity()
+    public function entity(): MorphOne
     {
         return $this->morphOne(Entity::class, 'entity');
     }