Browse Source
			
			
			
			
				
		agrege el metodo de estatus el cual no elimina completamente el campo de marca en mysql si no que lo pasa a un estado inactivo pero tambien agregue la funcion en el update conde si queires pudes cambiar el estatus denuevo y poder habilitar esa opcionmain
				 3 changed files with 73 additions and 44 deletions
			
			
		| @ -0,0 +1,29 @@ | |||
| <?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('marcas', function (Blueprint $table) { | |||
|             $table->boolean('eliminado')->default(false); | |||
|         }); | |||
|     } | |||
| 
 | |||
|     /** | |||
|      * Reverse the migrations. | |||
|      */ | |||
|     public function down(): void | |||
|     { | |||
|         Schema::table('marcas', function (Blueprint $table) { | |||
|             $table->dropColumn('eliminado'); | |||
|         }); | |||
|     } | |||
| }; | |||
					Loading…
					
					
				
		Reference in new issue