⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.31
Server IP:
95.217.99.93
Server:
Linux sv1.sonichosted.com 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
lifestylescentra
/
www
/
database
/
migrations
/
View File Name :
2024_03_06_105424_create_products_table.php
<?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::create('products', function (Blueprint $table) { $table->id(); $table->foreignId('brand_id')->constrained('product_brands'); $table->foreignId('tax_id')->nullable()->constrained('taxes')->nullOnDelete(); $table->string('slug')->unique(); $table->string('image')->nullable(); $table->json('images')->nullable(); $table->string('badge')->nullable(); $table->decimal('price', 10, 2); $table->decimal('discount', 10, 2)->default(0); $table->enum('discount_type', ['fixed', 'percent'])->default('fixed'); $table->decimal('cost_per_item')->nullable(); $table->boolean('has_variant')->default(false); $table->integer('stock')->default(0); $table->enum('stock_status', ['in_stock', 'out_of_stock'])->default('in_stock'); $table->json('attributes')->nullable(); $table->string('sku')->nullable(); $table->boolean('status')->default(1); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('products'); } };