public function delete() { $coso = self::$model->firstOrNew(rq('id')); if ($coso->exists) { $coso->update(); } else { } self::response($coso); }