]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Models/Deletion.php
added routes for zip export
[bookstack] / app / Entities / Models / Deletion.php
index 3face841b1890cdafc398c3374ec7d217b50675e..a73437c94a4110bee1dd7f0c98501d09e18d4df4 100644 (file)
@@ -2,17 +2,23 @@
 
 namespace BookStack\Entities\Models;
 
-use BookStack\Auth\User;
-use BookStack\Interfaces\Loggable;
+use BookStack\Activity\Models\Loggable;
+use BookStack\Users\Models\User;
 use Illuminate\Database\Eloquent\Model;
 use Illuminate\Database\Eloquent\Relations\BelongsTo;
 use Illuminate\Database\Eloquent\Relations\MorphTo;
 
 /**
- * @property Model $deletable
+ * @property int       $id
+ * @property int       $deleted_by
+ * @property string    $deletable_type
+ * @property int       $deletable_id
+ * @property Deletable $deletable
  */
 class Deletion extends Model implements Loggable
 {
+    protected $hidden = [];
+
     /**
      * Get the related deletable record.
      */
@@ -58,7 +64,7 @@ class Deletion extends Model implements Loggable
     /**
      * Get a URL for this specific deletion.
      */
-    public function getUrl($path): string
+    public function getUrl(string $path = 'restore'): string
     {
         return url("/settings/recycle-bin/{$this->id}/" . ltrim($path, '/'));
     }