valor de compra
This commit is contained in:
@@ -47,6 +47,7 @@ class ShowPromociones extends Component
|
||||
public $nombre_promocion;
|
||||
public $descripcion_promocion;
|
||||
public $valor_promocion;
|
||||
public $valor_compra_promocion;
|
||||
public $estado_promocion;
|
||||
public $fecha_limite_promocion;
|
||||
public $categoria_id_promocion;
|
||||
@@ -447,6 +448,7 @@ class ShowPromociones extends Component
|
||||
$this->validate([
|
||||
'nombre_promocion' => 'required',
|
||||
'descripcion_promocion' => 'required',
|
||||
'valor_compra_promocion' => 'required',
|
||||
'valor_promocion' => 'required',
|
||||
'estado_promocion' => 'required',
|
||||
'fecha_limite_promocion' => 'required',
|
||||
@@ -476,6 +478,7 @@ class ShowPromociones extends Component
|
||||
$nueva_promocion->nombre = $this->nombre_promocion;
|
||||
$nueva_promocion->descripcion = $this->descripcion_promocion;
|
||||
$nueva_promocion->precio = $this->valor_promocion;
|
||||
$nueva_promocion->precio_compra = $this->valor_compra_promocion;
|
||||
$nueva_promocion->visible = $this->estado_promocion;
|
||||
$nueva_promocion->fecha_limite = $this->fecha_limite_promocion;
|
||||
$nueva_promocion->categoria_id = $this->categoria_id_promocion;
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('promociones', function (Blueprint $table) {
|
||||
$table->string('precio_compra')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('promociones', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user