Merge branch 'faiqahzaman' into azfar_dev
This commit is contained in:
@@ -68,7 +68,7 @@ class LelongMobileController extends Controller
|
||||
$user_id = $user_id->tokenable_id; // !!!THIS ID WE CAN USE TO GET DATA OF YOUR USER!!!
|
||||
}
|
||||
|
||||
$feepayment = payment::where('fee' == 1)->first();
|
||||
$feepayment = payment::where('status', $status == 1)->first();
|
||||
|
||||
if($feepayment != null){
|
||||
|
||||
@@ -97,7 +97,7 @@ class LelongMobileController extends Controller
|
||||
$lelongBidder->save();
|
||||
|
||||
}
|
||||
else if($feepayment == null){
|
||||
else if($status == null){
|
||||
return response()->json("unsuccess", 201);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class lelongBidder extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'lelongbid';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'lelongbid_id',
|
||||
'nama_bidder',
|
||||
'hargabida',
|
||||
'notelbimbit',
|
||||
'nilaimarhun',
|
||||
'cajlelong',
|
||||
'status_bidder',
|
||||
'status_payment',
|
||||
'masa_bidaan'
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class payment extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'lelongbid';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'lelongbidder_id',
|
||||
'lelongbid_id',
|
||||
'kodcaw',
|
||||
'total_payment',
|
||||
'back_acc_pembeli',
|
||||
'bank_acc_no_pembeli',
|
||||
'nama_bank_acc_caw',
|
||||
'bank_no_acc_caw',
|
||||
'status_payment_opt',
|
||||
'resit_id',
|
||||
'status',
|
||||
'remark'
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class resit extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'lelongbid';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'lelongbid_id',
|
||||
'reference_no',
|
||||
'billplz_id',
|
||||
'total_payment',
|
||||
'resit_type', // 1 = fee , 2 = bid
|
||||
'status', //status => 1 = paid , 2 = pending
|
||||
'paid_at'
|
||||
];
|
||||
}
|
||||
@@ -48,9 +48,11 @@ class CreatePaymentTable extends Migration
|
||||
$table->unsignedBigInteger('user_id')->unsigned();
|
||||
$table->unsignedBigInteger('lelongbid_id')->unsigned()->nullable();
|
||||
$table->string('reference_no')->nullable();
|
||||
$table->integer('billplz_id');
|
||||
$table->string('total_payment');
|
||||
$table->string('billplz_id');
|
||||
$table->decimal('total_payment', $precision = 9, $scale = 2);
|
||||
$table->string('resit_type');
|
||||
$table->string('status')->nullable();
|
||||
$table->timestamp('paid_at')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('user_id')
|
||||
|
||||
Reference in New Issue
Block a user