@Sinnbeck number "1" , Tried also dd(Payment::where('status_id' , '2')->count()); and it gives 1, That's correct but when i use this $payment = Payment::where('status_id' , '1')->get(); , It brings them all
@Sinnbeck yes no result I mean even if i make it like this $payment = Payment::where('status_id' , '1')->get();
or like this $payment = Payment::where('status_id' , '2)->get(); or even a number not in database nothing happen also no errors
@Sinnbeck i have the data because of this $carts = Cart::where('opened' , '1')->get();
It's like the first where when user has paid and automatically the status_id in other table will be 1
Then the admin can update the status_id to 2 that mean it's delivered , In database everything is working well even in index i can see the status_id first one ('Paid', and it has the id '1') and the second one ('Delivered' and it has the id '2'),
@Sinnbeck it works but still showing the results with id '2' with word 'no payment for ',
Is that correct ? was trying to hide them and getting only with Id '1'
@kazzuya it's hard to say as I don't know what's in your database. But if your relationships are correct then it should be correct. Do you perhaps want to only get carts that has payment with status 1?