Add delivery_note field to products for planned delivery info
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,8 +44,9 @@ class ProductController extends Controller
|
||||
'weight' => 'nullable|numeric|min:0',
|
||||
'active' => 'boolean',
|
||||
'featured' => 'boolean',
|
||||
'track_stock' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
'track_stock' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
'delivery_note' => 'nullable|string|max:255',
|
||||
]);
|
||||
$data['slug'] = Str::slug($data['name']);
|
||||
$data['active'] = $request->boolean('active');
|
||||
@@ -89,8 +90,9 @@ class ProductController extends Controller
|
||||
'weight' => 'nullable|numeric|min:0',
|
||||
'active' => 'boolean',
|
||||
'featured' => 'boolean',
|
||||
'track_stock' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
'track_stock' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
'delivery_note' => 'nullable|string|max:255',
|
||||
]);
|
||||
$data['slug'] = Str::slug($data['name']);
|
||||
$data['active'] = $request->boolean('active');
|
||||
|
||||
@@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Product extends Model
|
||||
{
|
||||
protected $fillable = ['category_id','name','slug','description','base_price','sale_price','tax_rate','weight','active','featured','track_stock','sort_order'];
|
||||
protected $fillable = ['category_id','name','slug','description','base_price','sale_price','tax_rate','weight','active','featured','track_stock','sort_order','delivery_note'];
|
||||
|
||||
protected $casts = ['active' => 'boolean', 'featured' => 'boolean', 'track_stock' => 'boolean', 'base_price' => 'decimal:2', 'sale_price' => 'decimal:2', 'tax_rate' => 'decimal:2'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user