Specify table name in select to prevent id overwriting

This commit is contained in:
snipe
2015-11-25 02:38:13 -08:00
parent 20490986c6
commit dad1ffb355
3 changed files with 3 additions and 3 deletions
@@ -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')) {
+1 -1
View File
@@ -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')) {