Widget model setting convert always `object`
This commit is contained in:
parent
154ed74673
commit
61b17575fa
|
|
@ -77,12 +77,11 @@ class Widget extends Model
|
|||
*/
|
||||
public function getSettingsAttribute($value)
|
||||
{
|
||||
$settings = ! empty($value) ? json_decode($value) : (object) [];
|
||||
$settings = ! empty($value) ? (object) json_decode($value) : (object) [];
|
||||
|
||||
$settings->raw_width = false;
|
||||
|
||||
if (isset($settings->width)) {
|
||||
|
||||
$raw_width = $settings->width;
|
||||
$width = $this->getWidthAttribute($settings->width);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue