diff --git a/app/Models/FilamentType.php b/app/Models/FilamentType.php index bbb0592..3acfcfc 100644 --- a/app/Models/FilamentType.php +++ b/app/Models/FilamentType.php @@ -7,9 +7,16 @@ use Illuminate\Database\Eloquent\Model; class FilamentType extends Model { protected $table = 'filament_types'; + protected $primaryKey = 'id'; protected $fillable = [ 'name', 'description', ]; + + // FilamentType has many filaments + public function filaments() + { + return $this->hasMany(Filament::class); + } }