]> BookStack Code Mirror - bookstack/blobdiff - app/Actions/Activity.php
Extend /users API endpoint
[bookstack] / app / Actions / Activity.php
index 9d256c9b2918b2cdf0d7f543662bd7a7fb920f87..c8590f0b25d12dc8f4f29210e51cd3c8b28de897 100644 (file)
@@ -6,6 +6,7 @@ use BookStack\Auth\User;
 use BookStack\Entities\Models\Entity;
 use BookStack\Model;
 use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\Relations\MorphTo;
 use Illuminate\Support\Str;
 
 /**
@@ -23,7 +24,7 @@ class Activity extends Model
     /**
      * Get the entity for this activity.
      */
-    public function entity()
+    public function entity(): MorphTo
     {
         if ($this->entity_type === '') {
             $this->entity_type = null;