- Bug: data serialisaion on laravel 7.x (Coverage.php)

- solr path without solr string
- composer updates
This commit is contained in:
Arno Kaimbacher 2021-05-27 11:28:57 +02:00
parent b335bd7e9c
commit 9601389d83
4 changed files with 20 additions and 10 deletions

View file

@ -3,6 +3,7 @@ namespace App\Models;
use App\Models\Dataset;
use Illuminate\Database\Eloquent\Model;
use DateTimeInterface;
class Coverage extends Model
{
@ -47,6 +48,16 @@ class Coverage extends Model
{
$this->attributes['time_max'] = empty($date) ? null : \Illuminate\Support\Carbon::createFromFormat('Y-m-d H:i:s', $date);
}
/**
* Prepare a date for array / JSON serialization.
*
* @param \DateTimeInterface $date
* @return string
*/
protected function serializeDate(DateTimeInterface $date)
{
return $date->format('Y-m-d H:i:s');
}
/**
* relationship to dataset