24 lines
640 B
PHP
24 lines
640 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Services\CustomerService;
|
|
|
|
class GadaianController extends Controller
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->middleware('auth');
|
|
$this->customerService = New CustomerService();
|
|
}
|
|
|
|
public function index(Request $request)
|
|
{
|
|
$noic = $request->noic;
|
|
$customer_info = $this->customerService->getCustomerInfo($noic);
|
|
$limit_pinjaman_semasa = $customer_info['limit_pinjaman'] - $customer_info['pinjaman_semasa'];
|
|
return view('gadaian.index',compact('customer_info','limit_pinjaman_semasa'));
|
|
}
|
|
}
|