Laravel – column declaration $table->increments(‘loc_id’,true, false);

If you found something like this, this is an alternative way to declare $autoIncrement = false, $unsigned = false

$table->increments('type_id',true, false);
$table->unsignedInteger('location_id', false, false);

As found in the following file:


     * Create a new small integer (2-byte) column on the table.
     * @param  string  $column
     * @param  bool  $autoIncrement
     * @param  bool  $unsigned
     * @return \Illuminate\Support\Fluent
    public function smallInteger($column, $autoIncrement = false, $unsigned = false)
        return $this->addColumn('smallInteger', $column, compact('autoIncrement', 'unsigned'));


Leave a Reply

Your email address will not be published. Required fields are marked *