Init: Hoan thanh kien truc V3 va Filament UI
This commit is contained in:
20
app/Models/Project.php
Normal file
20
app/Models/Project.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Project extends Model
|
||||
{
|
||||
use HasUuids, HasFactory;
|
||||
|
||||
protected $guarded = []; // Cho phép lưu tất cả các cột
|
||||
|
||||
// Khai báo mối quan hệ: 1 Dự án có nhiều Sản phẩm
|
||||
public function products()
|
||||
{
|
||||
return $this->hasMany(Product::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user