Widget model setting convert always `object`

This commit is contained in:
Cüneyt Şentürk 2023-12-20 16:44:10 +03:00
parent 154ed74673
commit 61b17575fa
1 changed files with 1 additions and 2 deletions

View File

@ -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);