mirror of
https://github.com/anna-sara/filament_inventory
synced 2025-10-26 23:47:13 +01:00
23 lines
390 B
PHP
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);
|
|
}
|
|
}
|