Update source into github

This commit is contained in:
pbao9
2025-07-24 16:18:27 +07:00
parent 41419358dd
commit 69851ac7bc
2642 changed files with 284095 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Cart extends Model
{
use HasFactory;
protected $fillable = [
'product_id',
'customer_id',
'type_product',
'price',
'quantity',
'months',
];
public function product()
{
return match ($this->type_product) {
3 => $this->belongsTo(Hosting::class, 'product_id'),
4 => $this->belongsTo(VPS::class, 'product_id'),
default => null,
};
}
}