Przeglądaj źródła

Added nullable to brand field, removed timestamps

Alexander Musikhin 1 rok temu
rodzic
commit
71e542f33b

+ 1 - 0
app/Models/Product.php

@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany;
 
 class Product extends Model
 {
+    public $timestamps = false;
     protected $fillable = [
         'id',
         'title',

+ 1 - 2
database/migrations/2024_08_29_102201_create_products_table.php

@@ -20,7 +20,7 @@ return new class extends Migration
             $table->decimal('discount_percentage');
             $table->decimal('rating');
             $table->unsignedBigInteger('stock');
-            $table->string('brand');
+            $table->string('brand')->nullable();
             $table->string('sku');
             $table->decimal('weight');
             $table->decimal('width');
@@ -34,7 +34,6 @@ return new class extends Migration
             $table->string('barcode');
             $table->text('qr_code');
             $table->text('thumbnail');
-            $table->timestamps();
         });
     }