filament_inventory/app/Models/Category.php
2025-02-26 20:04:07 +01:00

23 lines
390 B
PHP

<?php
namespace App\Models;
use App\Models\Category;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
protected $fillable = [
'name',
'type'
];
/**
* Get the items for the type.
*/
public function item(): HasMany
{
return $this->hasMany(Item::class);
}
}