Timesheet Form - Weekly Overview and Week Record Edit

Filament 3
Also available in Filament 4/5 version

Timesheets are a special table where records are often grouped by the week. Let's re-create that and add a custom form that would edit all weekdays simultaneously.

FilamentExamples ThumbBase (52)

Get the Source Code:

Only This Example

$9

One-time payment

Full source code for Timesheet Form - Weekly Overview and Week Record Edit
Downloadable ZIP file with the source code
Lifetime access to this example
GitHub Sign in with GitHub to buy

Sign in first, then complete your $9 checkout.

Best value — all 168 examples

FilamentExamples Membership

$99 /year
or
$199 lifetime
Access to code of all 168 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
View membership plans

30-day money-back guarantee

How it works

First, in the table, we only show the weeks. To achieve this, we must modify the table query. To show value in the tables column, we set it as a default value.

NOTICE: Syntax for the table is for MySQL.

app/Filament/Resources/TimesheetResource.php:

public static function table(Table $table): Table
{
return $table
->modifyQueryUsing(function (Builder $query) {
$query->selectRaw('id, DATE_FORMAT(date, "%Y-%m-%d") as week_start')
->whereRaw('DAYOFWEEK(date) = 2') // Filter for Mondays only
->distinct()
->groupBy('week_start', 'date', 'id');
})
->columns([
// ...

Next we will work on:

  • Table display to display one week per row
  • Custom Edit page that would edit weekly records
  • Real-time calculations
The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.