mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Updated user_id to created_by
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
36aea52ae0
commit
a0b9714d72
|
@ -245,7 +245,7 @@ class LocationsController extends Controller
|
||||||
{
|
{
|
||||||
$this->authorize('view', Accessory::class);
|
$this->authorize('view', Accessory::class);
|
||||||
$this->authorize('view', $location);
|
$this->authorize('view', $location);
|
||||||
$accessory_checkouts = AccessoryCheckout::LocationAssigned()->with('admin')->with('accessories')->where('assigned_to', '=', $location->id);
|
$accessory_checkouts = AccessoryCheckout::LocationAssigned()->with('adminuser')->with('accessories')->where('assigned_to', '=', $location->id);
|
||||||
|
|
||||||
$offset = ($request->input('offset') > $accessory_checkouts->count()) ? $accessory_checkouts->count() : app('api_offset_value');
|
$offset = ($request->input('offset') > $accessory_checkouts->count()) ? $accessory_checkouts->count() : app('api_offset_value');
|
||||||
$limit = app('api_limit_value');
|
$limit = app('api_limit_value');
|
||||||
|
|
|
@ -23,7 +23,6 @@ class AccessoryCheckout extends Model
|
||||||
use Searchable;
|
use Searchable;
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'user_id',
|
|
||||||
'accessory_id',
|
'accessory_id',
|
||||||
'assigned_to',
|
'assigned_to',
|
||||||
'assigned_type',
|
'assigned_type',
|
||||||
|
@ -58,7 +57,7 @@ class AccessoryCheckout extends Model
|
||||||
*/
|
*/
|
||||||
public function adminuser()
|
public function adminuser()
|
||||||
{
|
{
|
||||||
return $this->hasOne(\App\Models\User::class, 'user_id');
|
return $this->hasOne(\App\Models\User::class, 'created_by');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue