Created Color Model

This commit is contained in:
2025-03-10 19:37:44 +01:00
parent 21f33383ae
commit 4f5e44f753
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Color extends Model
{
// Color Model
protected $table = 'colors';
protected $primaryKey = 'id';
protected $fillable = [
'name',
'hex'
];
// Color has many filaments
public function filaments()
{
return $this->hasMany(Filament::class);
}
// Color has many filament types
public function filamentTypes()
{
return $this->hasMany(FilamentType::class);
}
}