Specify table name in select to prevent id overwriting
This commit is contained in:
@@ -542,7 +542,7 @@ class AccessoriesController extends AdminController
|
||||
|
||||
public function getDatatable()
|
||||
{
|
||||
$accessories = Accessory::with('category', 'company')
|
||||
$accessories = Accessory::select('accessories.*')->with('category', 'company')
|
||||
->whereNull('accessories.deleted_at');
|
||||
|
||||
if (Input::has('search')) {
|
||||
|
||||
@@ -1198,7 +1198,7 @@ class AssetsController extends AdminController
|
||||
{
|
||||
|
||||
|
||||
$assets = Asset::with('model','assigneduser','assigneduser.userloc','assetstatus','defaultLoc','assetlog','model','model.category','assetstatus','assetloc', 'company')
|
||||
$assets = Asset::select('assets.*')->with('model','assigneduser','assigneduser.userloc','assetstatus','defaultLoc','assetlog','model','model.category','assetstatus','assetloc', 'company')
|
||||
->Hardware();
|
||||
|
||||
if (Input::has('search')) {
|
||||
|
||||
@@ -400,7 +400,7 @@ class ConsumablesController extends AdminController
|
||||
|
||||
public function getDatatable()
|
||||
{
|
||||
$consumables = Consumable::whereNull('consumables.deleted_at')
|
||||
$consumables = Consumable::select('consumables.*')->whereNull('consumables.deleted_at')
|
||||
->with('company','location','category','users');
|
||||
|
||||
if (Input::has('search')) {
|
||||
|
||||
Reference in New Issue
Block a user