Files
hatame.andarza09/app/Models/Favorite.php
T
hatame 687681744a git add .
git commit "Implement user registration"
2026-08-16 08:52:04 +03:30

47 lines
735 B
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Favorite
*
* @property int $id
* @property int $user_id
* @property string $favoritable_type
* @property int $favoritable_id
* @property Carbon|null $created_at
*
* @property User $user
*
* @package App\Models
*/
class Favorite extends Model
{
protected $table = 'favorites';
public $timestamps = false;
public static $snakeAttributes = false;
protected $casts = [
'user_id' => 'int',
'favoritable_id' => 'int'
];
protected $fillable = [
'user_id',
'favoritable_type',
'favoritable_id'
];
public function user()
{
return $this->belongsTo(User::class);
}
}