Browse Source

cast data type

pull/3/head
Muhammad Sulaiman Yusuf 3 years ago
parent
commit
4e644e5175
  1. 36
      app/Models/RequestMaterial.php

36
app/Models/RequestMaterial.php

@ -11,23 +11,29 @@ class RequestMaterial extends Model
const CREATED_AT = 'created_at'; const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at'; const UPDATED_AT = 'updated_at';
protected $casts = [
'id' => 'integer',
'price' => 'float',
'qty' => 'float',
];
protected $fillable = [ protected $fillable = [
'description', 'description',
'required_date', 'required_date',
'qty', 'qty',
'uom', 'uom',
'qty_received', 'qty_received',
'fom_date', 'fom_date',
'pr_date', 'pr_date',
'po_date', 'po_date',
'received_date', 'received_date',
'delivery_date', 'delivery_date',
'status', 'status',
'proyek_id', 'proyek_id',
'created_at', 'created_at',
'created_by', 'created_by',
'updated_at', 'updated_at',
'updated_by', 'updated_by',
'price' 'price'
]; ];
} }

Loading…
Cancel
Save