set relation user to directory
This commit is contained in:
parent
39b017d429
commit
f2dc31bbee
1 changed files with 12 additions and 0 deletions
|
|
@ -73,4 +73,16 @@ class User extends Authenticatable
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
// * RELATIONSHIPS
|
||||
|
||||
/**
|
||||
* MorphToMany directories relation.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\MorphToMany
|
||||
*/
|
||||
public function directories()
|
||||
{
|
||||
return $this->morphToMany(Directory::class, 'directorables');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue