laravel relationship limit 1 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);
}