public static function _schema_profilemodel(\Illuminate\Database\Schema\Blueprint $table) { $table->unsignedInteger('user_id'); $table->text('avatar'); $table->index(['user_id']); return $table; }
/** * Add default nested set columns to the table. Also create an index. * * @param \Illuminate\Database\Schema\Blueprint $table */ public static function columns(Blueprint $table) { $table->unsignedInteger(self::LFT); $table->unsignedInteger(self::RGT); $table->unsignedInteger(self::PARENT_ID)->nullable(); $table->index(self::getDefaultColumns()); }
/** * Create the table schema. * * @param Blueprint $table * * @return mixed */ protected function create(Blueprint $table) { $table->increments('id'); $table->unsignedInteger('job_id'); $table->string('name'); $table->unique(['job_id', 'name']); $table->timestamps(); }
public static function _schema_imageModel(Blueprint $table) { $table->string('image'); $table->string('url'); $table->unsignedInteger('order')->default(0); $table->string('type')->default('default'); $table->integer('width'); $table->integer('height'); $table->morphs('imageable'); return $table; }
/** * @param Blueprint $table * * @return \Illuminate\Support\Fluent */ public function setDatabaseFieldType(Blueprint $table) { return $table->unsignedInteger($this->getDBKey())->default($this->getDatabaseDefaultValue()); }