// SYSTEM PANEL //
[ROOT]
/
mnt
/
pleskStorage
/
vhosts
/
kodsolutions.net
/
subdomains
/
syaaraa.kodsolutions.net
/
database
/
migrations
[ PARENT ]
EDIT :: 2023_11_12_162953_create_properties_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('properties', function (Blueprint $table) { $table->id(); $table->boolean('active')->default(0)->nullable(); $table->boolean('best_deal')->default(0)->nullable(); $table->boolean('sponsored')->default(0)->nullable(); $table->boolean('featured')->default(0)->nullable(); $table->boolean('in_home')->default(0)->nullable(); $table->date('expired_at')->nullable(); $table->integer('no_views')->default(0)->nullable(); $table->integer('position')->default(0)->nullable(); $table->integer('payment_method')->default(0)->nullable(); $table->integer('the_view')->default(0)->nullable(); $table->integer('no_rooms')->default(0)->nullable(); $table->integer('no_bedrooms')->default(0)->nullable(); $table->integer('no_bathrooms')->default(0)->nullable(); $table ->foreignId('user_id') ->nullable() ->constrained() ->on('users') ->onUpdate('cascade') ->onDelete('cascade'); $table ->foreignId('office_id') ->nullable() ->constrained() ->on('offices') ->onUpdate('cascade') ->onDelete('cascade'); $table ->foreignId('city_id') ->nullable() ->constrained() ->on('cities') ->onUpdate('cascade') ->onDelete('cascade'); $table ->foreignId('area_id') ->nullable() ->constrained() ->on('cities') ->onUpdate('cascade') ->onDelete('cascade'); $table ->foreignId('category_id') ->nullable() ->constrained() ->on('categories') ->onUpdate('cascade') ->onDelete('cascade'); //house apartment office ... $table ->foreignId('type_id') ->nullable() ->constrained() ->on('categories') ->onUpdate('cascade') ->onDelete('cascade'); // rent - buy -sold $table->longText('title')->nullable(); $table->longText('sub_title')->nullable(); $table->longText('address')->nullable(); $table->longText('description')->nullable(); $table->longText('tags')->nullable(); $table->longText('keywords')->nullable(); $table->text('latitude')->nullable(); $table->text('longitude')->nullable(); $table->text('map_link')->nullable(); $table->string('image')->nullable(); $table->string('slug')->nullable(); $table->string('code')->nullable(); $table->float('price')->nullable(); $table->float('special_price')->nullable(); $table->float('discount')->nullable(); $table->float('area')->nullable(); //in sq ft $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('properties'); } };
SAVE
CANCEL