Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Template | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| serializeDate | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace Qmp\Laravel\SiteGeneratorDetail\Models; |
| 4 | |
| 5 | class Template extends \Moloquent |
| 6 | { |
| 7 | protected $connection = 'siteGeneratorMongo'; |
| 8 | protected $collection = 'templates'; |
| 9 | protected $primaryKey = 'value'; |
| 10 | protected $guarded = ['_id']; |
| 11 | protected $hidden = ['_id']; |
| 12 | |
| 13 | /** |
| 14 | * Prepare a date for array / JSON serialization. |
| 15 | * |
| 16 | * @param \DateTimeInterface $date |
| 17 | * @return string |
| 18 | */ |
| 19 | protected function serializeDate(\DateTimeInterface $date) |
| 20 | { |
| 21 | return $date->format('Y-m-d H:i:s'); |
| 22 | } |
| 23 | |
| 24 | } |