F
Filament14mo ago
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 }}
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
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
Jump to solution
2 Replies
Vp
VpOP14mo ago
I think this error might the HasMany relationship.. I'll look more
Solution
Vp
Vp13mo ago
Problem was HasMany.. now fixed
Want results from more Discord servers?
Add your server