Formatting a date column in table builder
Created 7 years ago by williamIn my tablebuilder, i have a custom query for my view ( see below ). I would like to format that date to only display year and month. What is the best way?
protected $views = [
'future' => [
'query' => FutureQuery::class,
'text' => 'Future Events',
'columns' => [
'title',
'date'
],
],
'past' => [
'query' => PastQuery::class,
'text' => 'Past Events',
'columns' => [
'title',
'date'
],
],
'all'
];
Answer