Skip to content

Commit

Permalink
feat: update like model
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Sep 23, 2024
1 parent d9ca8c0 commit 150592a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Models/Like.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

namespace CSlant\LaravelLike\Models;

class Like
use CSlant\LaravelLike\Enums\LikeTypeEnum;
use Illuminate\Database\Eloquent\Model;

class Like extends Model
{
protected $fillable = [
'user_id',
'model_id',
'model_type',
'type'
];

protected $casts = [
'model_type' => 'string',
'type' => LikeTypeEnum::class
];
}

0 comments on commit 150592a

Please sign in to comment.