Update
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Pgvector\Laravel\HasNeighbors;
|
||||
use Pgvector\Laravel\Vector;
|
||||
use Spatie\Tags\HasTags;
|
||||
|
||||
/**
|
||||
* Class MemeMedia
|
||||
@@ -33,13 +34,15 @@
|
||||
*/
|
||||
class MemeMedia extends Model
|
||||
{
|
||||
use HasNeighbors, SoftDeletes;
|
||||
use HasNeighbors, SoftDeletes, HasTags;
|
||||
|
||||
protected $table = 'meme_medias';
|
||||
|
||||
protected $casts = [
|
||||
'embedding' => Vector::class,
|
||||
'duration' => 'double',
|
||||
'keywords' => 'array',
|
||||
'is_enabled' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
@@ -85,7 +88,7 @@ class MemeMedia extends Model
|
||||
protected function ids(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn ($value, $attributes) => hashids_encode($attributes['id']),
|
||||
get: fn($value, $attributes) => hashids_encode($attributes['id']),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user