/
proc
/
thread-self
/
root
/
home
/
henzagold
/
server
/
app
/
Http
/
Controllers
/
Customer
/
File Upload :
llllll
Current File: //proc/thread-self/root/home/henzagold/server/app/Http/Controllers/Customer/TahesabController.php
<?php namespace App\Http\Controllers\Customer; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\DB\Te\TableEngine; use Illuminate\Support\Facades\Http; use Morilog\Jalali\Jalalian; class TahesabController extends Controller { public function index(Request $request) { $user = auth()->user()->mcode; $db = 1; $fromDate = $request->fromDate ?? Jalalian::forge(time())->subMonths(1)->format('Y/m/d'); $toDate = $request->toDate ?? Jalalian::forge(time())->format('Y/m/d'); return $responseMandeh = Http::withoutVerifying()->get("https://hesab.henzagold.com/fin_tahesab/fin_tahesab?tahesab_id=$user&db=$db&fromDate=$fromDate&toDate=$toDate&sfx=wcG97tkF@uKj8%NY4pbtVNFdp*2te6nmAiuo7zx%dLcEHXdUO@wDoD*Otm%x76h8eU6oYtC4FDtnF1K*fcQ%%26B93MDzsPn%26MNXzeK%26iNHAijdMZj%26UKxJ**Vr%G!0JdXn")->json(); } public function my_detail(Request $request, $offset = 0) { $user = auth()->user()->mcode; $db = 1; $offset = 0; return $responseDetails = Http::withoutVerifying()->get("https://hesab.henzagold.com/fin_tahesab/my_detail?tahesab_id=$user&db=$db&offset=$offset&sfx=wcG97tkF@uKj8%NY4pbtVNFdp*2te6nmAiuo7zx%dLcEHXdUO@wDoD*Otm%x76h8eU6oYtC4FDtnF1K*fcQ%%26B93MDzsPn%26MNXzeK%26iNHAijdMZj%26UKxJ**Vr%G!0JdXn")->json(); } public function detail(Request $request, $id) { $db = 1; $Factor_Code = $id; return $responseDetails = Http::withoutVerifying()->get("https://hesab.henzagold.com/fin_tahesab/GetHesabDetailByFactorCode?db=$db&Factor_Code=$Factor_Code&sfx=wcG97tkF@uKj8%NY4pbtVNFdp*2te6nmAiuo7zx%dLcEHXdUO@wDoD*Otm%x76h8eU6oYtC4FDtnF1K*fcQ%%26B93MDzsPn%26MNXzeK%26iNHAijdMZj%26UKxJ**Vr%G!0JdXn")->json(); } public function mandeh() { $user = auth()->user()->mcode; $db = 1; $responseMandeh = Http::withoutVerifying()->timeout(2)->get("https://hesab.henzagold.com/fin_tahesab/mandeh?tahesab_id=$user&db=$db&sfx=wcG97tkF@uKj8%NY4pbtVNFdp*2te6nmAiuo7zx%dLcEHXdUO@wDoD*Otm%x76h8eU6oYtC4FDtnF1K*fcQ%%26B93MDzsPn%26MNXzeK%26iNHAijdMZj%26UKxJ**Vr%G!0JdXn")->json(); if ($responseMandeh['status']==422) { return response()->json(['message' => $responseMandeh['message'],'status' => 422], 400); } return $responseMandeh ; } }
Copyright ©2k19 -
Hexid
|
Tex7ure