PHP code example of rupadana / filament-timeago
1. Go to this page and download the library: Download rupadana/filament-timeago library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rupadana / filament-timeago example snippets
public static function table(Table $table): Table
{
return $table
->columns([
TimeAgoColumn::make('created_at')
->dateLabel(
years: 'years',
months: 'months',
days: 'days',
hours: 'hours',
minutes: 'minutes',
seconds: 'seconds'
) // Optional
->interval(1000) // Optional, default : 0
->prefixText('string') // Optional
->suffixText('string') // Optional
])
}