32 lines
658 B
PHP
32 lines
658 B
PHP
<?php
|
|
|
|
namespace Modules\Gallery\app\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Modules\Gallery\Database\factories\GalleryCategoryFactory;
|
|
|
|
class GalleryCategory extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected $fillable = [
|
|
'uuid',
|
|
'category',
|
|
'type',
|
|
];
|
|
|
|
protected static function newFactory(): GalleryCategoryFactory
|
|
{
|
|
//return GalleryCategoryFactory::new();
|
|
}
|
|
|
|
public function gallery()
|
|
{
|
|
return $this->hasMany(Gallery::class, 'gallery_category_id');
|
|
}
|
|
}
|