renamed booking supplier book_id to booking_id

updated bookingSupplier to supplierBooking
updated get supplier api in supplier report
added download button to download report
This commit is contained in:
Jack Goh
2018-07-02 21:26:12 +08:00
parent bd55d385f7
commit 647c42a30e
5 changed files with 77 additions and 14 deletions
@@ -0,0 +1,34 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class RenameBookingForeignkeyFromSupplierbookingTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('supplier_bookings', function($table)
{
$table->dropForeign(['book_id']);
$table->dropColumn('book_id');
$table->integer('booking_id')->unsigned();
$table->foreign('booking_id')->references('id')->on('bookings');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}