A
A
Anon33632020-07-17 23:38:28
Laravel
Anon3363, 2020-07-17 23:38:28

Why did Relationships return an empty array?

What are the common causes?

class Cart extends Model
{
   function photo(){
    	return $this->hasMany("App\ProductPhoto","product_id");
    }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question