WIP: funcion/faltantes-y-sobrantes #52

Draft
atasistro wants to merge 39 commits from funcion/faltantes-y-sobrantes into master
Showing only changes of commit 68cb740187 - Show all commits

View file

@ -0,0 +1,30 @@
<?php
use App\TipoPedido;
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()
{
TipoPedido::firstOrCreate(['nombre' => 'faltantes_y_sobrantes']);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$faltantesYSobrantes = TipoPedido::where('nombre', 'faltantes_y_sobrantes')->firstOrFail();
$faltantesYSobrantes->delete();
}
};