F
Filament4mo ago
Bloom

Help on table eloquent relationship

I have Sale and Branch Model with one to Many relationship. I made custom page with query like
public function table(Table $table): Table
{
return $table
->relationship(fn (): HasMany => $this->branch->sales())
->inverseRelationship('branch')
->columns([
TextColumn::make('branch_name'),
]);
}
public function table(Table $table): Table
{
return $table
->relationship(fn (): HasMany => $this->branch->sales())
->inverseRelationship('branch')
->columns([
TextColumn::make('branch_name'),
]);
}
But unfortunately no result came. I tried debugging using debug bar but no query regarding this join is visible
0 Replies
No replies yetBe the first to reply to this messageJoin