Complex query between 4 tables in Laravel

69
May 11, 2022, at 8:10 PM

I have 4 tables : users , user_store_info , user_store_options , product_supplies

users :

id,
name,
email,

user_store_info :

id,
user_id (FK),
store_name,

user_store_options

id,
store_id (FK),
title,

product_supplies:

id,
user_id (FK),
product_id(FK) ref to products table

Models:

User-->UserStoreInfo-->UserStoreOptions

User<--ProductSupply

I want to show the supplies that the supplier store has more features.

ProductSupply::withCount("user_store_options")->orderBy("user_store_options_count" , "DESC")->get();
READ ALSO
how to add data to json file flutter?

how to add data to json file flutter?

i have a datajson file like this in which i am getting a list of data i want to add another parameter{p_quantity} to this json file

54
Android MenuItem not always initialized

Android MenuItem not always initialized

I have an activity with three MenuItem'sI have three variables at the top of the activity class for each MenuItem (e

69
App is crashing when i click on any item in recyclerview

App is crashing when i click on any item in recyclerview

I was creating a recycler view and trying to create a toast when any item is clicked on using interface(i'm doing for first time)But my app is crashing when i click any item in recycler view

56
Kotlin: Subscribe to Firebase Cloud Messaging(FCM) Topic

Kotlin: Subscribe to Firebase Cloud Messaging(FCM) Topic

I've used the Android (Java) way of doing things before for subscribing to a topic

67