Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
Error | |
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\FileGenerator\Models; |
4 | |
5 | use Qmp\Laravel\ApiFilterRequest\Traits\TraitFilterModel; |
6 | |
7 | class Error extends \Moloquent |
8 | { |
9 | use TraitFilterModel; |
10 | |
11 | protected $carbonDates = ['created_at', 'updated_at']; |
12 | |
13 | protected $connection = 'fileGeneratorMongo'; |
14 | protected $collection = 'file_generator_errors'; |
15 | protected $guarded = ['_id']; |
16 | |
17 | /** |
18 | * Prepare a date for array / JSON serialization. |
19 | * |
20 | * @param \DateTimeInterface $date |
21 | * @return string |
22 | */ |
23 | protected function serializeDate(\DateTimeInterface $date) |
24 | { |
25 | return $date->format('Y-m-d H:i:s'); |
26 | } |
27 | } |