diff --git a/app/Models/tiposVeiculos.php b/app/Models/tiposVeiculos.php index 7d9a9f9..ae100dc 100644 --- a/app/Models/tiposVeiculos.php +++ b/app/Models/tiposVeiculos.php @@ -10,5 +10,6 @@ class tiposVeiculos extends Model use HasFactory; protected $fillable = [ 'nombre', + 'tipo_combustible', ]; } diff --git a/database/factories/TiposVeiculosFactory.php b/database/factories/TiposVeiculosFactory.php index dd66b1a..9b51bcf 100644 --- a/database/factories/TiposVeiculosFactory.php +++ b/database/factories/TiposVeiculosFactory.php @@ -18,6 +18,7 @@ class TiposVeiculosFactory extends Factory { return [ "nombre"=> $this->faker->name(), + "Tipo de Combustible"=> $this->faker->sentence(), // ]; } diff --git a/database/migrations/2025_03_06_162928_create_tipos_veiculos_table.php b/database/migrations/2025_03_06_162928_create_tipos_veiculos_table.php index 5f82a27..5a7c45a 100644 --- a/database/migrations/2025_03_06_162928_create_tipos_veiculos_table.php +++ b/database/migrations/2025_03_06_162928_create_tipos_veiculos_table.php @@ -14,6 +14,7 @@ return new class extends Migration Schema::create('tipos_veiculos', function (Blueprint $table) { $table->id(); $table->string('nombre'); + $table->string('tipo_combustible'); $table->timestamps(); }); } diff --git a/database/migrations/2025_03_13_050724_add_tipo_combustible_to_tipos_veiculos_table.php b/database/migrations/2025_03_13_050724_add_tipo_combustible_to_tipos_veiculos_table.php new file mode 100644 index 0000000..07722dc --- /dev/null +++ b/database/migrations/2025_03_13_050724_add_tipo_combustible_to_tipos_veiculos_table.php @@ -0,0 +1,28 @@ +string('tipo_combustible')->after('nombre')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('tipos_veiculos', function (Blueprint $table) { + $table->dropColumn('tipo_combustible'); + }); + } +}; diff --git a/resources/views/vehiculos.blade.php b/resources/views/vehiculos.blade.php index 5c00bdd..57a7ab9 100644 --- a/resources/views/vehiculos.blade.php +++ b/resources/views/vehiculos.blade.php @@ -55,6 +55,7 @@