Hikari Mashiro
Select ->relationship table not found.
Hey guys, run into a little trouble using Select->relationship. Advice appreciated. Thanks.
The follow code is in the
Action::make('accept_offer')->form()
Error: SQLSTATE[HY000]: General error: 1 no such table: shop_branches
I am using the same code in the default admin panel resource and it work well. It also work well in v2 for v2 when using the old ways.
But when I use it on user panel which I created and render the widget via .
in the blade file, it throw the error above. The table do exist in my db.2 replies
getTableQuery using groupBy
Hello, I have been trying to create a table using getTableQuery() for Widget.
What I want to do is make the table show Monday - Sunday on the column with application count under each date.
I currently have this query in getTableQuery()
return Application::selectRaw('COUNT(id) as count, DAYOFWEEK(created_at) as dayOfWeek')
->whereYear('created_at', date('Y'))
->groupBy(DB::raw('DAYOFWEEK(created_at)'));
but it keep telling me "Filament\Widgets\TableWidget::getTableRecordKey(): Return value must be of type string, null returned"
Advice appreciated. Thanks!7 replies