added owner relationship
This commit is contained in:
parent
6b6e44371e
commit
9ad8780741
@ -68,6 +68,16 @@ abstract class Model extends Eloquent implements Ownable
|
||||
return $this->belongsTo('App\Models\Common\Company');
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function owner()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Auth\User', 'id', 'created_by');
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope to only include company data.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user