#FEAT
+ Added new example about the new feature: custom column
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
class Product extends Model
|
||||
{
|
||||
@@ -19,4 +20,9 @@ class Product extends Model
|
||||
{
|
||||
return $this->belongsTo(SubDepartment::class);
|
||||
}
|
||||
|
||||
public function settings() : HasOne
|
||||
{
|
||||
return $this->hasOne(ProductSetting::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user