I have a resource called Brand, and have tried making a relationship manager for Products. However, on my Brands table I don't have any product ids, because it can have hundreds.
my products table has a brand_id column
How do i properly set up this relationship in filament? Do I need to create an in between table?
Solution
php artisan make:filament-relation-manager BrandResource products name
php artisan make:filament-relation-manager BrandResource products name
Brand Model
public function products(): HasMany{ return $this->hasMany(Product::class);}
public function products(): HasMany{ return $this->hasMany(Product::class);}
Product Model
public function brand(): BelongsTo{ return $this->belongsTo(Brand::class);}
public function brand(): BelongsTo{ return $this->belongsTo(Brand::class);}