]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Role.php
Fixed failing test after drawio default url change
[bookstack] / app / Auth / Role.php
index fc2e39aa9c5425c9262e1ab9bdb11eb24f3e6062..51b2ce301eae721fd1a7beb7e0d871f6c522836e 100644 (file)
@@ -7,6 +7,7 @@ use BookStack\Auth\Permissions\RolePermission;
 use BookStack\Interfaces\Loggable;
 use BookStack\Model;
 use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\Factories\HasFactory;
 use Illuminate\Database\Eloquent\Relations\BelongsToMany;
 use Illuminate\Database\Eloquent\Relations\HasMany;
 
@@ -23,8 +24,12 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
  */
 class Role extends Model implements Loggable
 {
+    use HasFactory;
+
     protected $fillable = ['display_name', 'description', 'external_auth_id'];
 
+    protected $hidden = ['pivot'];
+
     /**
      * The roles that belong to the role.
      */