title: Laravel migration inheritance is not working
body: <p>I'm new to Laravel and php so I face and error I don't know how to solve.</p>
  
  <p>The basic problem is since a lot of tables have <code>primary:id</code> and <code>created_by,updated_by</code> columns what I've figured out is inheriting them in my migrations.</p>
  
  <p>I'm using php7</p>
  
  <p>So I have a Base class</p>
  
  <pre><code>class BaseMigration extends Migration {
  
    public function up(string $tableName) {
      Schema::create($tableName, function (Blueprint $table) {
        $table-&gt;mediumIncrements('id');
        $table-&gt;primary('id');
  
        $table-&gt;unsignedMediumInteger('created_by')-&gt;references('id')-&gt;on('users');
        $table-&gt;unsignedMediumInteger('updated_by')-&gt;references('id')-&gt;on('users');
      });
    }
  }
  </code></pre>
  
  <p>and the extending migration</p>
  
  <pre><code>class CreateItemsTable extends BaseMigration {
  
      public function up() {
          parent::up('items');
  
          Schema::create('items', function (Blueprint $table) {
  
            $table-&gt;string('name', 74);
            $table-&gt;timestamps();
          });
      }
  
      // ......
  }
  </code></pre>
  
  <p>However <code>php artisan migrate</code> gives me this:</p>
  
  <p><code>[ErrorException] Declaration of CreateItemsTable::up() should be compatible with Illuminate\Database\Migrations\BaseMigration::up(string $tableName)</code></p>
  
  <p>Is it because I'm running double <code>up()</code> ?</p>
  
  <p>What am I missing? Appreciate your kind help.</p>