public function table(Table $table): Table
{
return $table
->heading('upcoming Projects')
->query(Project::query())
->modifyQueryUsing(fn(Builder $query) => $query->where('project_date','>=', now())->take(4))
->columns([
Tables\Columns\TextColumn::make('name'),
Tables\Columns\TextColumn::make('project_date'),
])
->actions([
Tables\Actions\Action::make('go to')
->url(fn (Project $record): string => route('project.show', ['id' => $record]))
])
->contentFooter(\view('livewire.projects.footers.table-footer'))
->paginated(false);
}
public function table(Table $table): Table
{
return $table
->heading('upcoming Projects')
->query(Project::query())
->modifyQueryUsing(fn(Builder $query) => $query->where('project_date','>=', now())->take(4))
->columns([
Tables\Columns\TextColumn::make('name'),
Tables\Columns\TextColumn::make('project_date'),
])
->actions([
Tables\Actions\Action::make('go to')
->url(fn (Project $record): string => route('project.show', ['id' => $record]))
])
->contentFooter(\view('livewire.projects.footers.table-footer'))
->paginated(false);
}