Я не могу понять, почему я получаю эту ошибку в этом файле миграции?Ошибка миграции Laravel
Ошибка
[37; 41m [Symfony \ Component \ Debug \ Исключение \ FatalThrowableError] ← [39; 49m ← [37; 41m вызов функции членом Nullable() на нуль ← [39 ; 49m
Дата в файле после создания иностранного идентификатора в таблице Customers. Это laravel 5.3. Как я могу устранить эту ошибку?
public function up()
{
Schema::create('invoices', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('customer_id')->unsigned();
$table->timestamps('date_from')->nullable();
$table->timestamps('date_to')->nullable();
$table->date('invoice_date')->nullable();
$table->date('due_at')->nullable();
$table->integer('total_charge')->nullable();
$table->integer('rate')->nullable();
$table->integer('total_hours')->nullable();
$table->string('status')->nullable();
$table->string('description', 255)->nullable();
$table->string('notes', 255)->nullable();
$table->string('invoice_ref')->nullable();
$table->foreign('customer_id')
->references('id')->on('customers')
->onDelete('cascade');
});
}