nuevo formulario
This commit is contained in:
@@ -38,6 +38,7 @@ class ShowServicio extends Component
|
||||
public $url;
|
||||
public $precio;
|
||||
public $renovacion = false;
|
||||
public $dgo = false;
|
||||
|
||||
protected $rules = [
|
||||
'nombre_servicio' => 'required',
|
||||
@@ -110,6 +111,7 @@ class ShowServicio extends Component
|
||||
$servicio->url = $this->url;
|
||||
$servicio->renovacion = $this->renovacion;
|
||||
$servicio->precio = $this->precio;
|
||||
$servicio->dgo = $this->dgo;
|
||||
$servicio->save();
|
||||
|
||||
$this->alert('success', 'Servicio creado correctamente!', [
|
||||
@@ -141,6 +143,7 @@ class ShowServicio extends Component
|
||||
$this->url = $consulta_servicios->url;
|
||||
$this->renovacion = $consulta_servicios->renovacion == 1 ? true : false;
|
||||
$this->precio = $consulta_servicios->precio;
|
||||
$this->dgo = $consulta_servicios->dgo == 1 ? true : false;
|
||||
}
|
||||
public function guardar()
|
||||
{
|
||||
@@ -200,7 +203,8 @@ class ShowServicio extends Component
|
||||
'ver_url' => $this->ver_url,
|
||||
'url' => $this->url,
|
||||
'renovacion' => $this->renovacion == 1 ? true : false,
|
||||
'precio'=> $this->precio
|
||||
'precio'=> $this->precio,
|
||||
'dgo' => $this->dgo
|
||||
]);
|
||||
|
||||
$this->serviciosEditar = false;
|
||||
@@ -270,6 +274,7 @@ class ShowServicio extends Component
|
||||
$this->completa = null;
|
||||
$this->tiempo = null;
|
||||
$this->renovacion = null;
|
||||
$this->dgo = null;
|
||||
$this->servicio = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user