mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Change method name from userloc to location
This needs to be changed in more places though
This commit is contained in:
parent
f4e7bfc28d
commit
121e158f39
|
@ -53,7 +53,7 @@ class UsersController extends Controller
|
|||
'users.activated',
|
||||
'users.avatar',
|
||||
|
||||
])->with('manager', 'groups', 'userloc', 'company', 'department','throttle','assets','licenses','accessories','consumables')
|
||||
])->with('manager', 'groups', 'location', 'company', 'department','throttle','assets','licenses','accessories','consumables')
|
||||
->withCount('assets','licenses','accessories','consumables');
|
||||
$users = Company::scopeCompanyables($users);
|
||||
|
||||
|
|
|
@ -199,12 +199,22 @@ class User extends SnipeModel implements AuthenticatableContract, CanResetPasswo
|
|||
|
||||
/**
|
||||
* Get the asset's location based on the assigned user
|
||||
* @todo - this should be removed once we're sure we've switched it
|
||||
* to location()
|
||||
**/
|
||||
public function userloc()
|
||||
{
|
||||
return $this->belongsTo('\App\Models\Location', 'location_id')->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the asset's location based on the assigned user
|
||||
**/
|
||||
public function location()
|
||||
{
|
||||
return $this->belongsTo('\App\Models\Location', 'location_id')->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user's manager based on the assigned user
|
||||
**/
|
||||
|
|
Loading…
Reference in a new issue