mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange into feature/admin-home-frontend
This commit is contained in:
@@ -506,6 +506,7 @@ class BookingController extends Controller
|
||||
}
|
||||
|
||||
$userBankSlip->is_approve = 1;
|
||||
$userBankSlip->estimated_arrival_time = $request->input('estimated_arrival_time');
|
||||
$userBankSlip->save();
|
||||
return response()->json(['message'=>'Success'],200);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserBankSlip extends Model
|
||||
{
|
||||
protected $fillable = ['bank_slip_type','bankslip_url','transfer_amount','booking_id','cust_marking'];
|
||||
protected $fillable = ['bank_slip_type','bankslip_url','transfer_amount','booking_id','cust_marking','estimated_arrival_time'];
|
||||
|
||||
public function booking()
|
||||
{
|
||||
|
||||
@@ -11,5 +11,6 @@ $factory->define(App\UserBankSlip::class, function (Faker $faker) {
|
||||
'transfer_amount' => $faker->randomDigit,
|
||||
'cust_marking' => str_random(10),
|
||||
'booking_id' => $faker->randomElement($book_id),
|
||||
'estimated_arrival_time' => $faker->randomDigit
|
||||
];
|
||||
});
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddEtaUserBankSlipTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('user_bank_slips', function (Blueprint $table) {
|
||||
$table->integer('estimated_arrival_time');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
if (Schema::hasColumn('user_bank_slips', 'estimated_arrival_time')) {
|
||||
Schema::table('user_bank_slips', function (Blueprint $table) {
|
||||
// $table->dropColumn('estimated_arrival_time');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,9 @@ class BookingTest extends TestCase
|
||||
public function testApproveBankSlip()
|
||||
{
|
||||
$this->actingAs($this->user)
|
||||
->json('POST','/api/booking/' . $this->booking->id . '/approve-bank-slip', [])
|
||||
->json('POST','/api/booking/' . $this->booking->id . '/approve-bank-slip', [
|
||||
'estimated_arrival_time' => '6000'
|
||||
])
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user