How to make Table widget with merge 2 sources of data

I m trying to create a widget of summary income expenses. But incomes could come from 2 models 2 tables with different table structures. I want to create a new custom table to list daily incomes from 2 database tables in one Table widget with date sorting. Please advise how I make $table->query for this. php public function table(Table $table): Table { return $table ->query( fn (Builder $query) => $query->where('user_id', auth()->id()) ->orderByDesc('created_at') ->limit(5) ) ->columns([ // ... ]); }
0 Replies
No replies yetBe the first to reply to this messageJoin