setiawanh
setiawanh
FFilament
Created by setiawanh on 5/7/2024 in #❓┊help
Custom Filament Table with Query of Left Joined Tables
Thanks! It is working now. There was a mistake in the "query" that I created.
15 replies
FFilament
Created by setiawanh on 5/7/2024 in #❓┊help
Custom Filament Table with Query of Left Joined Tables
Thanks, Dennis. I think I am getting somewhere. I tried as follow:
public function table(Table $table): Table
{
return $table
->query(Employee::query()->leftJoin('attendances','employees.id','=','attendances.employee_id'))
->columns([
TextColumn::make('first_name'), // column exists in Employee table and is showing
TextColumn::make('result'), // column exists in Attendances table but is NOT showing
])...
}
public function table(Table $table): Table
{
return $table
->query(Employee::query()->leftJoin('attendances','employees.id','=','attendances.employee_id'))
->columns([
TextColumn::make('first_name'), // column exists in Employee table and is showing
TextColumn::make('result'), // column exists in Attendances table but is NOT showing
])...
}
It seems to run correctly but the "result" column which supposes to get the data from the "attendances" table is not showing. Did I miss anything? Thanks!
15 replies
FFilament
Created by setiawanh on 5/7/2024 in #❓┊help
Custom Filament Table with Query of Left Joined Tables
table ->query(Employee::query())->modifyQueryUsing(fn (Builder $query) => $query->leftJoin(...))? Something like this?
15 replies
FFilament
Created by setiawanh on 5/7/2024 in #❓┊help
Custom Filament Table with Query of Left Joined Tables
What should I put in the function body?
15 replies
FFilament
Created by setiawanh on 5/7/2024 in #❓┊help
Custom Filament Table with Query of Left Joined Tables
Can you help with an example for the above SQL query? I cannot seem to find the documentation for this method on Filament Table
15 replies
FFilament
Created by setiawanh on 5/4/2024 in #❓┊help
Action button in View Resource to Show Create Popup based on Relationship Manager
Thank you... getForm() as not found. What class is "Organization"?
8 replies
FFilament
Created by setiawanh on 5/4/2024 in #❓┊help
Action button in View Resource to Show Create Popup based on Relationship Manager
@PovilasKorop thanks. In the end, I have tried to create a filament resource for EmployeeWorkHistory by itself and point the URL to there with prepopulated employee. Will see how this works 🙂 Thanks!
8 replies