title: Laravel 5.5 - How to create a `negative_id` column value based on `id` value?
body: <p>I am doing a test, but not sure how to do it with laravel migration file. In short, there is the auto incrementing <code>id</code> field (which will always be a positive integer). But I also want a <code>negative_id</code> field, which would be the value of <code>id * -1</code>, and would be automatically inserted in sync when an <code>id</code> is inserted to the database. So when the first user is added, <code>id</code> is automatically added as <code>1</code> so <code>negative_id</code> should be added as <code>-1</code> for that row, since <code>1 * -1 = -1</code>. The table should look like this:</p>
  
  <pre><code>| id | negative_id 
  ------------------
  | 1  | -1                   
  | 2  | -2                   
  | 3  | -3  
  </code></pre>
  
  <p>Below is my current migration file:</p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Support\Facades\Schema;
  use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Database\Migrations\Migration;
  
  class CreateUsersTable extends Migration {
      public function up(){
          Schema::create('users', function (Blueprint $table) {
              $table-&gt;increments('id');
              $table-&gt;integer('negative_id'); // how to make this id*-1 value
          });
      }
  
      public function down(){
          Schema::dropIfExists('users');
      }
  </code></pre>
  
  <p>Any idea how to accomplish this from the migration file?         </p>