Files
SkinbaseNova/app/Models/UserFavorite.php
2026-02-08 10:42:01 +01:00

30 lines
535 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class UserFavorite extends Model
{
protected $table = 'user_favorites';
public $timestamps = false;
protected $fillable = [
'user_id',
'artwork_id',
'created_at',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function artwork(): BelongsTo
{
return $this->belongsTo(Artwork::class);
}
}