Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scategory = Purchase::with('products')
- ->where('purchases.products_id', '=', 'products_id')
- ->Where('purchases.user_id', '=', Auth::user()->id)
- ->withCount('purchases.category')
- ->orderBy('purchases_category', 'DESC')
- ->get();
- Call to undefined method IlluminateDatabaseQueryBuilder::products.category()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement