You have to define a custom value if the relationship id is not found on the target model like: retu...
try to use get() method instead of all()
First of all, before posting any thread please see the preview of the thread, as it's hard to find t...
Problem: The problem is you were doing the OR operation of status and $query value. Solution: You ha...
below is the updated code that you can use to get the active courses. public function posts(Request...
The Laravel portal for problem solving, knowledge sharing and community building.