mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-03-14 20:39:44 +01:00
Service model, with JSON decoding/encoding of attributes
This commit is contained in:
parent
015bf2358a
commit
96a12a9e0d
11
app/models/Service.php
Normal file
11
app/models/Service.php
Normal 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);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user