@@ -8,8 +8,9 @@ use Illuminate\Database\Eloquent\Model;
class Like extends Model
{
use HasFactory;
+ protected $primaryKey = 'id';
+ protected $casts = [
+ 'id' => 'string'
+ ];
protected $fillable = ['type' , 'target_id', 'target_type','user_id','context'];
- protected $casts = [
- 'id' => 'string'
- ];
}