limit does not work with hasmany laravel 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);
}