buat penebusan lar aiyo ini pun nak tanya ka
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class PenebusanController extends Controller
|
||||
{
|
||||
@@ -11,7 +13,24 @@ class PenebusanController extends Controller
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
public function index(){
|
||||
return view('penebusan.index');
|
||||
public function index($norujukan){
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
$gadaidetail = Http::get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
|
||||
$noic = $gadaidetail[0][0]['nokp'];
|
||||
$customerdetail = Http::get(config('api.url') . '/api/customers/'. $noic)->json();
|
||||
$marhundetail = Http::get(config('api.url') . '/api/marhun/'. $norujukan)->json();
|
||||
|
||||
// dd($marhundetail[0]);
|
||||
|
||||
$marhun = $marhundetail[0];
|
||||
$nama = $customerdetail[0]['nama'];
|
||||
|
||||
$gadai = $gadaidetail[0][0];
|
||||
|
||||
|
||||
return view('penebusan.index',compact('cawangan_info','api_url','gadai','marhun','nama'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user