Fix helper implementation

Use class with static files instead of load it directly in composer json
This commit is contained in:
Afiq Hamzah
2023-11-27 09:49:52 +08:00
parent 8c09f6f64d
commit 6739237477
4 changed files with 18 additions and 26 deletions
@@ -3,14 +3,12 @@
namespace App\Http\Controllers;
use App\Cawangan;
use App\CawanganDetail;
use App\Customer;
use App\Gadai;
use App\Marhun;
use DateTime;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Services\Reports\GadaianService as ReportGadaianService;
use App\Helper;
class ReportGadaiController extends Controller
{
@@ -27,7 +25,7 @@ class ReportGadaiController extends Controller
$startDate = $request->startDate;
$endDate = $request->endDate;
$active_cawangan_db_connection = getActiveCawanganDbConnection();
$active_cawangan_db_connection = Helper::getActiveCawanganDbConnection();
$active_cawangan_db_name = array_map(function ($db_connection) {
return config('database.connections' . '.' . $db_connection . '.' . 'database');