abdulhameed
abdulhameed
FFilament
Created by abdulhameed on 5/23/2024 in #❓┊help
consume data from service class to widget table
Hello, I have this problem. I have a service class that has a different logic inside it, and I want to display the data returned from it in the widget table in Filamentt, but I have had several problems, knowing that I use the Postgresql database. Is there a way to do this? public static function getActiveUsers() { return PurchaseItem::where('via_package', null) ->with('user') ->whereMonth('created_at',7) ->whereYear('created_at',2023) ->select('user_id', \DB::raw('count(*) as total')) ->groupBy('user_id') ->orderBy('total', 'desc') ->limit(100) ->get(); #da
1 replies