Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request #31 from antshater/fix_dates
Browse files Browse the repository at this point in the history
Поправлен баг с датами
  • Loading branch information
xxxcoltxxx committed Apr 7, 2016
2 parents c14215f + 89411ba commit f1fadad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GridTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private function mapDataWithTemplates($data, $templates)
foreach ($templates as $cell_name => $viewFunc) {

if (in_array($cell_name, $this->data_provider->getDates())){
if (! $item->{$cell_name} instanceof Carbon){
if ($item->{$cell_name} && !$item->{$cell_name} instanceof Carbon){
$item->{$cell_name} = \Carbon\Carbon::parse($item->{$cell_name})->format($this->data_provider->getDateFormat());
}
}
Expand Down

0 comments on commit f1fadad

Please sign in to comment.