Made method name consistent

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-09-19 16:45:51 +01:00
parent c93229179b
commit 354b00ef15

View file

@ -738,14 +738,9 @@ class License extends Depreciable
/** /**
* Query builder scope to order on the user that created it * Query builder scope to order on the user that created it
*
* @param \Illuminate\Database\Query\Builder $query Query builder instance
* @param text $order Order
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/ */
public function scopeOrderCreatedBy($query, $order) public function scopeOrderByCreatedBy($query, $order)
{ {
return $query->leftJoin('users as users_sort', 'licenses.created_by', '=', 'users_sort.id')->select('licenses.*')->orderBy('users_sort.first_name', $order)->orderBy('users_sort.last_name', $order); return $query->leftJoin('users as admin_sort', 'licenses.created_by', '=', 'admin_sort.id')->select('licenses.*')->orderBy('admin_sort.first_name', $order)->orderBy('admin_sort.last_name', $order);
} }
} }