title: How to make a Migration file based on a model in Laravel
body: <p>What if I have some model, with non-default features (like soft delete or custom id name) and want to create a Migration file from it, which would have all these properties in it? So here is my model:</p>
  
  <pre><code>class Test extends Model
  {
     use SoftDeletes;
  
     protected $primaryKey = 'test_id';
     protected $table = 'my_flights';
     protected $dates = ['deleted_at'];
  }
  </code></pre>
  
  <p>And I want my Migration file to be based on it. But when I use command <code>php artisan make:migration create_test(s)_table</code> (I tried both <code>test</code> and <code>tests</code>) also with parameters <code>--create</code> or <code>--table</code> I get the Migration file as there was not any model:</p>
  
  <pre><code>class CreateTestTable extends Migration
  {
      public function up()
      {
          Schema::create('test', function (Blueprint $table) {
              $table-&gt;increments('id');
              $table-&gt;timestamps();
          });
      }  ...
  </code></pre>