where(['option_name'=> $key])->value('option_value'); $data = $config? json_decode($config, true) : []; if(empty($data)){ $data = $config; } return $data; } }