resource; if(!empty($model)){ return [ 'id' => $model->id, 'name' => $model->name, 'admin_id' => $model->admin_id ?? 1, 'area_fence' => $model->area_fence, 'area_centre' => $model->area_centre, 'area_fushe_fence' => $model->area_fushe_fence, 'area_radius' => $model->area_radius, 'customer_service_time' => $model->customer_service_time, 'customer_service_phone' => $model->customer_service_phone, 'status' => (bool)$model->status, 'created_at' => (string)$model->created_at, 'updated_at' => (string)$model->updated_at, 'areaSetting' => $model->areaSetting, 'merchant_id' => $model->merchant_id, 'merchant_data' => $model->merchantData, ]; }else{ return []; } } }