Compare commits

...

2 Commits

  1. 0
      -i
  2. 28
      database/migrations/2025_03_27_183714_add_columneliminado_toprestamos.php
  3. 28
      database/migrations/2025_03_28_175646_add_estado_to_prestamos_table.php
  4. 28
      database/migrations/2025_03_28_182126_add_estado_to_prestamos_table.php
  5. 5
      database/migrations/2025_05_08_174026_create_prestamos_table.php
  6. 1
      routes/web.php

28
database/migrations/2025_03_27_183714_add_columneliminado_toprestamos.php

@ -1,28 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('prestamos', function (Blueprint $table) {
$table->boolean('eliminado')->default(false);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('prestamos', function (Blueprint $table) {
$table->dropColumn('eliminado');
});
}
};

28
database/migrations/2025_03_28_175646_add_estado_to_prestamos_table.php

@ -1,28 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('prestamos', function (Blueprint $table) {
//
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('prestamos', function (Blueprint $table) {
//
});
}
};

28
database/migrations/2025_03_28_182126_add_estado_to_prestamos_table.php

@ -1,28 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('prestamos', function (Blueprint $table) {
//
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('prestamos', function (Blueprint $table) {
//
});
}
};

5
database/migrations/2025_03_27_174121_create_prestamos_table.php → database/migrations/2025_05_08_174026_create_prestamos_table.php

@ -20,7 +20,10 @@ return new class extends Migration
$table->text('motivo');
$table->string('domicilio');
$table->integer('numero_personas');
$table->boolean('chofer')->default(false); // Opción de sí (true) o no (false)
$table->boolean('chofer')->default(false);
$table->enum('estado', ['pendiente', 'aceptado', 'rechazado'])->default('pendiente');
$table->timestamp('fecha_aceptacion')->nullable();
$table->boolean('eliminado')->default(false);
$table->timestamps();
});
}

1
routes/web.php

@ -65,6 +65,7 @@ use App\Http\Controllers\PrestamoController;
// Rutas protegidas que requieren autenticación
// Rutas protegidas que requieren autenticación
Route::middleware(['auth'])->group(function () {

Loading…
Cancel
Save