]> BookStack Code Mirror - bookstack/blobdiff - app/Ownable.php
Update settings.php
[bookstack] / app / Ownable.php
index 28d55c2bb98156cb08a4b6e2e44842270f4bbe99..e660a0500de165cbc7233bacf3bf9e3b65f9debf 100644 (file)
@@ -1,6 +1,6 @@
 <?php namespace BookStack;
 
-use Illuminate\Database\Eloquent\Model;
+use BookStack\Auth\User;
 
 abstract class Ownable extends Model
 {
@@ -10,7 +10,7 @@ abstract class Ownable extends Model
      */
     public function createdBy()
     {
-        return $this->belongsTo('BookStack\User', 'created_by');
+        return $this->belongsTo(User::class, 'created_by');
     }
 
     /**
@@ -19,7 +19,7 @@ abstract class Ownable extends Model
      */
     public function updatedBy()
     {
-        return $this->belongsTo('BookStack\User', 'updated_by');
+        return $this->belongsTo(User::class, 'updated_by');
     }
 
     /**
@@ -30,5 +30,4 @@ abstract class Ownable extends Model
     {
         return strtolower(array_slice(explode('\\', static::class), -1, 1)[0]);
     }
-
-}
\ No newline at end of file
+}