Service model, with JSON decoding/encoding of attributes

This commit is contained in:
James Brooks 2014-11-27 14:01:38 +00:00
parent 015bf2358a
commit 96a12a9e0d

11
app/models/Service.php Normal file
View File

@ -0,0 +1,11 @@
<?php
class Service extends Eloquent {
public function getPropertiesAttribute($properties) {
return json_decode($properties);
}
public function setPropertiesAttribute($properties) {
$this->attributes['properties'] = json_encode($properties);
}
}