22 lines
418 B
PHP
22 lines
418 B
PHP
<?php
|
|
|
|
namespace Modules\Products\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
final class Product extends Model
|
|
{
|
|
protected $guarded = [];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'price' => 'decimal:2',
|
|
'features' => 'array',
|
|
'is_active' => 'boolean',
|
|
'is_featured' => 'boolean',
|
|
'sort_order' => 'integer',
|
|
];
|
|
}
|
|
}
|