table('transactions')->addTimestamps(); $table->addColumn('user_id', 'integer', [ 'signed' => false, 'null' => false ]) ->addColumn('code', 'string') ->addColumn('type', 'string') ->addColumn('total', 'integer', [ 'null' => false ]) ->addForeignKey('user_id', 'users'); $table->create(); } }