]> BookStack Code Mirror - bookstack/blobdiff - app/Ownable.php
Default OpenID display name set to standard value
[bookstack] / app / Ownable.php
index 8890c01bfec41840ad0981384ad90ab1e19f6f81..bf24fad5d8676c5198783aa4b547a19d76ca13bd 100644 (file)
@@ -1,6 +1,11 @@
 <?php namespace BookStack;
 
+use BookStack\Auth\User;
 
+/**
+ * @property int created_by
+ * @property int updated_by
+ */
 abstract class Ownable extends Model
 {
     /**
@@ -9,7 +14,7 @@ abstract class Ownable extends Model
      */
     public function createdBy()
     {
-        return $this->belongsTo('BookStack\User', 'created_by');
+        return $this->belongsTo(User::class, 'created_by');
     }
 
     /**
@@ -18,7 +23,7 @@ abstract class Ownable extends Model
      */
     public function updatedBy()
     {
-        return $this->belongsTo('BookStack\User', 'updated_by');
+        return $this->belongsTo(User::class, 'updated_by');
     }
 
     /**
@@ -29,5 +34,4 @@ abstract class Ownable extends Model
     {
         return strtolower(array_slice(explode('\\', static::class), -1, 1)[0]);
     }
-
-}
\ No newline at end of file
+}