0

I am working with laravel 5.4 and my issue is how to declare a composite key in model. My composite key consists of

A_ID | S_ID

I have already research some other solutions but they weren't clear enough for me to understand.

and as the

model::find

Doesn't work with composite key, what would be the work around that?

ALI ISMAEEL
  • 115
  • 1
  • 14
  • Note about the duplicate: Ignore the accepted answer, and check the second answer with a current vote of 58. – aynber Dec 27 '18 at 19:19

1 Answers1

0

Could you try something like this

StoreMember::where('user_id',1)->where('store_id',1)->first();