laravel limit relationship results code example
Example: laravel has many limit
public function posts()
{
return $this->hasMany('App\Models\Post', 'cat_id')->take(4);
}
public function posts()
{
return $this->hasMany('App\Models\Post', 'cat_id')->take(4);
}