i am fetching data from MSSQL using
DB::table('Snags')
->select('Resource.ResourceName')->alias('ResourceName')
->addselect('Snags.SnagRef')->alias('SnagRef')
->addselect('Snags.OpenDate')->alias('Date')
->addselect('Snags.Problem')->alias('Problem')
->addselect('SnagPriority.Class')->alias('Category')
->addselect('Snags.PilotClearance')->alias('PilotClearance')
->addselect('SnagStatus.Status')->alias('Status')
->join('SnagStatus', 'Snags.StatusId','=','SnagStatus.Id')
->join('SnagPriority', 'Snags.PriorityId ','=','SnagPriority.Id')
->join('Resource','Snags.ResourceId','=','Resource.ResourceId')
->orderByRaw('Resource.ResourceName ASC')
->pipe($this->dataStore('Snags'));
And Viewing it by
Table::create(array(
"dataStore"=>$this->dataStore('Snags'),
"columns"=>array(
"ResourceName"=>array(
"label"=>"Resource",
),
"SnagRef"=>array(
"label"=>"Ref #",
),
"Date"=>array(
"label"=>"Open Date",
"type"=>"datetime",
"format"=>"Y-m-d H:i:s",
"displayFormat"=>"d-m-Y D"
)
),
"options"=>array(
"title"=>"Device Utilization Summary"
),
"cssClass"=>array(
"table"=>"table table-hover table-striped table-bordered"
),
"removeDuplicate"=>array("ResourceName")
));
Format is not working, could you please help