sortBy === $column) {
$this->sortDirection = $this->sortDirection === 'asc' ? 'desc' : 'asc';
} else {
$this->sortBy = $column;
$this->sortDirection = 'asc';
}
}
#[Computed]
public function clients()
{
return Client::orderBy($this->sortBy, $this->sortDirection)->paginate(10);
}
};
?>
Name
Abbreviation
Audition Date
Status
Created
@foreach($this->clients as $client)
{{ $client->name }}
{{ $client->abbreviation }}
{{ $client->audition_date->local()->format('m/d/Y') }}
{{ $client->status->value }}
{{ $client->created_at->local()->format('m/d/Y | g:i A') }}
@endforeach