Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. $scategory = Purchase::with('products')
  2. ->where('purchases.products_id', '=', 'products_id')
  3. ->Where('purchases.user_id', '=', Auth::user()->id)
  4. ->withCount('purchases.category')
  5. ->orderBy('purchases_category', 'DESC')
  6. ->get();
  7.  
  8. Call to undefined method IlluminateDatabaseQueryBuilder::products.category()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement