first commit
This commit is contained in:
38
app/Models/PropertyProductMapping.php
Normal file
38
app/Models/PropertyProductMapping.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class PropertyProductMapping extends BaseModel
|
||||
{
|
||||
/**
|
||||
* The database table used by the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'property_product_mapping';
|
||||
protected $appends = ['parameterArray'];
|
||||
|
||||
const CREATED_AT = 'created_at';
|
||||
const UPDATED_AT = 'updated_at';
|
||||
|
||||
protected $dateFormat = 'U';
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [];
|
||||
|
||||
function getParameterArrayAttribute()
|
||||
{
|
||||
$attribute = [];
|
||||
if (!empty($this->parameter)) {
|
||||
$attribute = json_decode($this->parameter, 1);
|
||||
}
|
||||
return $attribute;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user