FilamentF
Filament3y ago
4 replies
Vp

Could not parse date, double date specification

I create a page resource and display data like below.. Today I got this weird bug/error

I've created Page resource & display like this
return $table
    ->query(Candidate::query()->where('is_complete', true))
    ->columns([
        Tables\Columns\TextColumn::make('user.userJobApplies.created_at')
            ->date()
            ->label('Last Activity'),
    ])

// Candidate.php modal
public function user(): BelongsTo
{
    return $this->belongsTo(User::class);
}

// User.php
public function userJobApplies(): HasMany
{
    return $this->hasMany(UserJobApply::class);
}

// blade.php
{{ $this->table }}

Error:
Could not parse '2023-10-23 09:05:59, 2023-11-10 05:52:44': Failed to parse time string (2023-10-23 09:05:59, 2023-11-10 05:52:44) at position 21 (2): Double date specification

This is working fine If I have only one data in
UserJobApply
but error comes if it's more than one. so what should be the error?
Solution
Problem was
HasMany
.. now fixed
Was this page helpful?