I have three different eloquent query for get count of my tables.
$posts = Post::where('published', true)->count(); $pages = Pages::where('published', true)->count(); $products = Product::where('published', true)->count(); There is a way for have an unique Eloquent query?
I am concerned about the safety of my query, so if possible, I'd like to avoid DB::raw.