23 lines
		
	
	
		
			537 B
		
	
	
	
		
			PHP
		
	
	
	
		
		
			
		
	
	
			23 lines
		
	
	
		
			537 B
		
	
	
	
		
			PHP
		
	
	
	
|  | <?php namespace BookStack; | ||
|  | 
 | ||
|  | 
 | ||
|  | trait Ownable | ||
|  | { | ||
|  |     /** | ||
|  |      * Relation for the user that created this entity. | ||
|  |      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||
|  |      */ | ||
|  |     public function createdBy() | ||
|  |     { | ||
|  |         return $this->belongsTo('BookStack\User', 'created_by'); | ||
|  |     } | ||
|  | 
 | ||
|  |     /** | ||
|  |      * Relation for the user that updated this entity. | ||
|  |      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||
|  |      */ | ||
|  |     public function updatedBy() | ||
|  |     { | ||
|  |         return $this->belongsTo('BookStack\User', 'updated_by'); | ||
|  |     } | ||
|  | } |