One to Many Relationship. Implementing --associate

'''
Hi,
I have,

Tables:
businesses
briefcases

So, a briefcase can have many business.

Business Model:
  public function briefcase(): belongsTo
  {
      return $this->belongsTo(Briefcase::class);
  }


Briefcase Model:
  public function businesses(): hasMany
  {
      return $this->hasMany(Business::class);
  }


Relation Manager --associate:
php artisan make:filament-relation-manager BriefcaseResource businesses name --view --associate


When trying to associate a business I get:
Call to undefined method App\Models\Business::briefcases()


Any suggestions?
Thank you.
Was this page helpful?