Working on the Actionlog and ReportsController - still having issues getting data back the way I want

This commit is contained in:
Vincent Sposato
2015-07-31 19:29:44 -04:00
parent c74c89a171
commit e560cc2ee2
2 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -592,12 +592,12 @@ class ReportsController extends AdminController
->get()
->toArray(), 'id' );
$assetsCheckedOutThatRequireAcceptance = Asset::deployed()
->inModelList( $modelsInCategoriesThatRequireAcceptance )
->list( 'id', 'assigned_to' )
->get()
->toArray();
$assetMaintenances = AssetMaintenance::with( 'asset', 'supplier' )
->orderBy( 'created_at', 'DESC' )
->get();
+12 -2
View File
@@ -1,5 +1,6 @@
<?php
use Illuminate\Database\Eloquent\SoftDeletingTrait;
use Illuminate\Support\Facades\DB;
class Actionlog extends Eloquent
@@ -69,8 +70,6 @@
}
/**
* Get the parent category name
*/
@@ -85,6 +84,16 @@
}
}
public function getListingOfActionLogsChronologicalOrder()
{
return DB::table( 'asset_logs' )
->select( '*' )
->orderBy( 'asset_id', 'asc' )
->orderBy( 'created_at', 'asc' )
->get();
}
public function getLatestCheckoutActionForAssets()
{
@@ -108,4 +117,5 @@
return $query->where( 'action_type', '=', 'checkout' )
->where( 'accepted_id', '=', null );
}
}