skip to Main Content

Get Only children from hasmany relation laravel 8

I have two mysql table with HasMany/belongsTo relation like this : public function Products() { return $this->hasMany(Prices::class, 'product_id'); } public function Prices() { return $this->belongsTo(Products::class); } If i do the following function, i can get the latest price for every…

VIEW QUESTION
Back To Top
Search