get list lelong details
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\AuthMobile;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class LelongController extends Controller
|
||||
{
|
||||
public function listLelongDetails(Request $request){
|
||||
|
||||
$gettlelong = batchlelongonline::on('mysql7')
|
||||
->where('t_lelong','=',$t_lelong)
|
||||
->first();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\AuthMobile;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Lelong;
|
||||
use App\Models\LelongBid;
|
||||
use App\Models\LelongBidMarhun;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class LelongMobileController extends Controller
|
||||
{
|
||||
public function listLelongDetails(Request $request){
|
||||
|
||||
$currentdate = Carbon::now();
|
||||
$currentdate = $currentdate->toDateString();
|
||||
|
||||
$lelong = Lelong::where('tarikh_lelong','=',$currentdate)->get();
|
||||
|
||||
$arrayID = [];
|
||||
foreach($lelong as $data)
|
||||
{
|
||||
array_push($arrayID,$data->id);
|
||||
}
|
||||
$lelongbid = LelongBid::whereIn('lelong_id',$arrayID)
|
||||
->join('lelongbidmarhun','lelongbid.id','=','lelongbidmarhun.lelongbid_id')
|
||||
->get();
|
||||
|
||||
$surat = LelongBid::whereIn('lelong_id',$arrayID)->get();
|
||||
|
||||
if(sizeof($lelongbid)!=0)
|
||||
{
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'lelong' => $lelong,
|
||||
'surat' => $surat,
|
||||
'item' => $lelongbid
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'No Data',
|
||||
], 401);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getlelongdetails(Request $request){
|
||||
|
||||
$currentdate = Carbon::now();
|
||||
$currentdate = $currentdate->toDateString();
|
||||
|
||||
$lelong = Lelong::where('tarikh_lelong','=',$currentdate)->get();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
namespace App\Http\Controllers\AuthMobile;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
Reference in New Issue
Block a user