9 Commits

Author SHA1 Message Date
afrina aac29bc199 Merge pull request 'fix: recalculate gadai totals after marhun edits' (#21) from fix/marhun-edit-gadai-totals into main
Build Docker Image / build-backend (push) Successful in 18s
Deploy to Staging / deploy (push) Successful in 17s
Reviewed-on: #21
2026-10-05 10:43:45 +08:00
nurafrinaalimi16 9e73f6ad32 fix: recalculate gadai totals after marhun edits 2026-10-05 10:39:19 +08:00
ISMAIL MASSERAN ff21d82af5 DONE: remove nginx for local docker compose 2026-10-01 13:45:34 +08:00
ismailmasseran 62c6d240ce Merge pull request 'DONE: update cicd to auto deploy on staging, clean up garbage files' (#20) from cicd/auto-deploy-staging into main
Build Docker Image / build-backend (push) Successful in 17s
Deploy to Staging / deploy (push) Successful in 17s
Reviewed-on: #20
2026-10-01 12:01:34 +08:00
ISMAIL MASSERAN 1ee7edefff DONE: update cicd to auto deploy on staging, clean up garbage files 2026-10-01 12:00:09 +08:00
ismailmasseran b52f4b6919 Merge pull request 'DONE: add password on laravel log viewer' (#19) from feature/add-pass-logviewer into main
Build Docker Image / build-backend (push) Successful in 18s
Reviewed-on: #19
2026-09-28 16:27:55 +08:00
ISMAIL MASSERAN b8e3e2b369 DONE: add password on laravel log viewer 2026-09-28 16:26:50 +08:00
ismailmasseran 3a86ba5b26 Merge pull request 'DONE: add env based checking for whatsapp before testing at staging' (#18) from feature/env-based-whatsapp-cloud into main
Build Docker Image / build-backend (push) Successful in 18s
Reviewed-on: #18
2026-09-28 10:30:11 +08:00
ISMAIL MASSERAN b1934e1627 DONE: add env based checking for whatsapp before testing at staging 2026-09-28 10:26:06 +08:00
18 changed files with 157 additions and 7948 deletions
+2
View File
@@ -98,6 +98,8 @@ TENNANT_KAUNTER_DB=kaunter_erahn
KAUNTER_URL=http://host.docker.internal:8081
INTERNAL_NOTIFICATION_SECRET=
LOGVIEWER_PASSWORD=
WHATSAPP_TOKEN= # Paste token from Graph API explorer.
WHATSAPP_PHONE_NUMBER_ID=1323449077519027
WHATSAPP_API_VERSION=v25.0
+4 -2
View File
@@ -9,6 +9,7 @@ API_ARRAHNBID_ANNUR=https://adminbid-annur.erahn.com.my/api/
LOG_CHANNEL=stack
LOG_SLACK_WEBHOOK_URL=
LOGVIEWER_PASSWORD="$2y$10$k7eiUyZdm3BruwAaT1gbmelTm.PPgZptOEQT1nlBjyiR84a4KBMlm"
DB_CONNECTION_2=mysql
DB_HOST_2=192.168.1.216
@@ -77,11 +78,12 @@ TENNANT_KAUNTER_DB=kaunter_erahn
KAUNTER_URL=https://ujrah.erahn.com.my
INTERNAL_NOTIFICATION_SECRET="nIDTe(u@6[)VLJyd"
WHATSAPP_CLOUD_ENABLED=true
WHATSAPP_TOKEN=EAAZAonT56AO0BSnZAhWLi4UXDRT6iAldbiybxSQZAnGrzIke1QiNWvQkZAbQQTjWeVZC5bL1gEBhW6ff3Shf79nowXiTQEwyxqgZAZB6ZATwFCeTs8MZA5H6ZA76IJBuVqRiAZBvZCfkeSurbUNpEWyi9W7zsT2GWiZCLX8meX0KCfDHu7cp4aBgVu1Ps5ZCRO3bP4ZCQZDZD
WHATSAPP_PHONE_NUMBER_ID=1323449077519027
WHATSAPP_PHONE_NUMBER_ID=1375899418935337
WHATSAPP_API_VERSION=v25.0
WHATSAPP_TEMPLATE=hebahan_pembiayaan_online
WHATSAPP_TEMPLATE_LANG=ms
WHATSAPP_VERIFY_TOKEN=418ed86d49422071681c76bed25ae1cb7e90456c794a92f1c9ea417945a35a0a
WHATSAPP_APP_SECRET=
ADMIN_PHONE_NUMBER=6097414339
ADMIN_PHONE_NUMBER=
+9 -7
View File
@@ -13,6 +13,7 @@ MYSQL_PUBLISH_PORT=3308
LOG_CHANNEL=stack
LOG_LEVEL=debug
LOG_SLACK_WEBHOOK_URL=
LOGVIEWER_PASSWORD=test123
DB_CONNECTION=mysql
DB_HOST=mysql
@@ -88,11 +89,12 @@ TENNANT_KAUNTER_DB=kaunter_erahn
KAUNTER_URL=https://staging.erahn.com.my/login
INTERNAL_NOTIFICATION_SECRET=staging_noti_secret
WHATSAPP_TOKEN= # Paste token from Graph API explorer.
WHATSAPP_PHONE_NUMBER_ID=1323449077519027
WHATSAPP_CLOUD_ENABLED=false
WHATSAPP_TOKEN=EAAZAonT56AO0BSnZAhWLi4UXDRT6iAldbiybxSQZAnGrzIke1QiNWvQkZAbQQTjWeVZC5bL1gEBhW6ff3Shf79nowXiTQEwyxqgZAZB6ZATwFCeTs8MZA5H6ZA76IJBuVqRiAZBvZCfkeSurbUNpEWyi9W7zsT2GWiZCLX8meX0KCfDHu7cp4aBgVu1Ps5ZCRO3bP4ZCQZDZD
WHATSAPP_PHONE_NUMBER_ID=1375899418935337
WHATSAPP_API_VERSION=v25.0
WHATSAPP_TEMPLATE=hello_world
WHATSAPP_TEMPLATE_LANG=en_US
WHATSAPP_VERIFY_TOKEN= # webhook verify token
WHATSAPP_APP_SECRET= # X-Hub-Signature-256 checks; need to be enable first
ADMIN_PHONE_NUMBER=60193450165
WHATSAPP_TEMPLATE=hebahan_pembiayaan_online
WHATSAPP_TEMPLATE_LANG=ms
WHATSAPP_VERIFY_TOKEN=418ed86d49422071681c76bed25ae1cb7e90456c794a92f1c9ea417945a35a0a
WHATSAPP_APP_SECRET=
ADMIN_PHONE_NUMBER=
+37 -18
View File
@@ -1,6 +1,9 @@
name: Deploy to Staging
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
image_tag:
@@ -18,10 +21,22 @@ jobs:
runs-on: host
steps:
- name: Resolve image tag
id: resolve
run: |
set -e
if [ "${{ gitea.event_name }}" = "workflow_dispatch" ]; then
IMAGE_TAG="${{ inputs.image_tag }}"
else
IMAGE_TAG="${{ gitea.ref_name }}"
fi
echo "IMAGE_TAG=${IMAGE_TAG}" >> "$GITHUB_OUTPUT"
echo "Deploying image tag: ${IMAGE_TAG}"
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.image_tag }}
ref: ${{ steps.resolve.outputs.IMAGE_TAG }}
- name: Login to Docker registry
run: |
@@ -33,43 +48,47 @@ jobs:
- name: Verify image exists in registry
run: |
set -e
IMAGE_TAG="${{ inputs.image_tag }}"
IMAGE_TAG="${{ steps.resolve.outputs.IMAGE_TAG }}"
IMAGE="${APP_IMAGE}:${IMAGE_TAG}"
echo "Checking if image exists: ${IMAGE}"
if ! docker manifest inspect "${IMAGE}" > /dev/null 2>&1; then
echo "ERROR: Image ${IMAGE} does not exist in registry!"
echo "Run the Build Docker Image workflow first."
exit 1
fi
echo "✓ ${IMAGE} found"
# Tag pushes build in parallel — wait for the image to appear
for i in $(seq 1 30); do
if docker manifest inspect "${IMAGE}" > /dev/null 2>&1; then
echo "✓ ${IMAGE} found"
exit 0
fi
echo "Image not ready yet (attempt ${i}/30), waiting 20s..."
sleep 20
done
echo "ERROR: Image ${IMAGE} does not exist in registry after waiting!"
echo "Run the Build Docker Image workflow first."
exit 1
- name: Pull Docker image
run: |
set -e
IMAGE_TAG="${{ inputs.image_tag }}"
IMAGE_TAG="${{ steps.resolve.outputs.IMAGE_TAG }}"
docker pull "${APP_IMAGE}:${IMAGE_TAG}"
echo "✓ Image pulled successfully"
- name: Sync compose file and deploy
run: |
set -e
IMAGE_TAG="${{ inputs.image_tag }}"
IMAGE_TAG="${{ steps.resolve.outputs.IMAGE_TAG }}"
mkdir -p "${DEPLOY_DIR}/docker/nginx" "${DEPLOY_DIR}/docker/mysql"
cp docker-compose.staging.yml "${DEPLOY_DIR}/docker-compose.yml"
cp docker/nginx/default.conf "${DEPLOY_DIR}/docker/nginx/default.conf"
cp -R docker/mysql/init "${DEPLOY_DIR}/docker/mysql/"
if [ ! -f "${DEPLOY_DIR}/.env.staging" ]; then
if [ -f .env.staging ]; then
cp .env.staging "${DEPLOY_DIR}/.env.staging"
echo "Copied .env.staging from repo (first deploy). Edit ${DEPLOY_DIR}/.env.staging on the server if needed."
else
echo "ERROR: ${DEPLOY_DIR}/.env.staging is missing on the server"
exit 1
fi
if [ ! -f .env.staging ]; then
echo "ERROR: .env.staging is missing in the repository"
exit 1
fi
cp .env.staging "${DEPLOY_DIR}/.env.staging"
echo "✓ Synced .env.staging from repo"
cd "${DEPLOY_DIR}"
+43 -28
View File
@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use App\Marhun;
use App\Gadai;
use App\Jemas;
use App\Cawangan;
use Illuminate\Http\Request;
@@ -160,39 +161,53 @@ class MarhunController extends Controller
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$old_data = Marhun::on($cawangan['mysql'])->where([['recno','=',$request->recno],['norujukan','=',$norujukan]])->first();
// Lock the parent first so concurrent edits to this SAG are serialized.
(new Marhun)->setConnection($cawangan['mysql'])->getConnection()->transaction(function () use ($cawangan, $norujukan, $request, $harga, $nilai_marhun, $kodcaw, $current) {
Gadai::on($cawangan['mysql'])->where('norujukan', $norujukan)->lockForUpdate()->firstOrFail();
$old_data = Marhun::on($cawangan['mysql'])->where([['recno','=',$request->recno],['norujukan','=',$norujukan]])->firstOrFail();
$marhunToUpdate = [
'karat' => $request->karat,
'marhun' => $request->marhun,
'nota' => $request->nota,
'tag_permata' => $request->tag_permata,
'berat_batu_permata' => $request->berat_batu_permata,
'berat' => $request->berat,
'harga' => $harga['harga'],
'n_marhun' => $nilai_marhun,
'bil' => $request->kuantiti,
];
$marhunToUpdate = [
'karat' => $request->karat,
'marhun' => $request->marhun,
'nota' => $request->nota,
'tag_permata' => $request->tag_permata,
'berat_batu_permata' => $request->berat_batu_permata,
'berat' => $request->berat,
'harga' => $harga['harga'],
'n_marhun' => $nilai_marhun,
'bil' => $request->kuantiti,
];
// Set value berat_batu_permata to null if value passed is null
if($marhunToUpdate['berat_batu_permata'] == '') {
$marhunToUpdate['berat_batu_permata'] = null;
};
// Set value berat_batu_permata to null if value passed is null
if($marhunToUpdate['berat_batu_permata'] == '') {
$marhunToUpdate['berat_batu_permata'] = null;
};
$jemas = Marhun::on($cawangan['mysql'])->where([['recno','=',$request->recno],['norujukan','=',$norujukan]])->update($marhunToUpdate);
$jemas = Marhun::on($cawangan['mysql'])->where([['recno','=',$request->recno],['norujukan','=',$norujukan]])->update($marhunToUpdate);
$new_data = Marhun::on($cawangan['mysql'])->where([['recno','=',$request->recno],['norujukan','=',$norujukan]])->first();
// Recalculate from every item belonging to this SAG, after the edit.
$totals = Marhun::on($cawangan['mysql'])->where('norujukan', $norujukan)
->selectRaw('COALESCE(SUM(berat), 0) AS total_berat, COALESCE(SUM(n_marhun), 0) AS total_nilai, COALESCE(SUM(bil), 0) AS total_kuantiti')
->first();
Gadai::on($cawangan['mysql'])->where('norujukan', $norujukan)->update([
'berat' => $totals->total_berat,
'nilaimarhun' => $totals->total_nilai,
'kuantiti' => $totals->total_kuantiti,
]);
$audit = new Audit();
$audit->users = $request->teller;
$audit->actions = 'Ubah Marhun';
$audit->norujukan = $norujukan;
$audit->old_data = $old_data;
$audit->new_data = $new_data;
$audit->kodcaw = $kodcaw;
$audit->created_at = $current;
$audit->updated_at = $current;
$audit->save();
$new_data = Marhun::on($cawangan['mysql'])->where([['recno','=',$request->recno],['norujukan','=',$norujukan]])->first();
$audit = new Audit();
$audit->users = $request->teller;
$audit->actions = 'Ubah Marhun';
$audit->norujukan = $norujukan;
$audit->old_data = $old_data;
$audit->new_data = $new_data;
$audit->kodcaw = $kodcaw;
$audit->created_at = $current;
$audit->updated_at = $current;
$audit->save();
});
return response('Edit Successfully', 200);
}
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Http\Middleware;
use Closure;
class LogViewerPassword
{
public function handle($request, Closure $next)
{
$passwordHash = config('logviewer.password');
if (!is_string($passwordHash) || $passwordHash === '') {
return response('Akses log belum dikonfigurasi.', 503)
->header('Cache-Control', 'no-store');
}
$provided = $request->getPassword();
if ($request->getUser() !== 'logviewer' || !is_string($provided) ||
!password_verify($provided, $passwordHash)) {
return response('Kata laluan diperlukan untuk mengakses log.', 401, [
'WWW-Authenticate' => 'Basic realm="Log Viewer", charset="UTF-8"',
'Cache-Control' => 'no-store',
]);
}
$response = $next($request);
$response->headers->set('Cache-Control', 'no-store');
return $response;
}
}
+2 -2
View File
@@ -54,10 +54,10 @@ class WhatsappPembiayaanOnlinePaid extends Job
$storedPhone = $customer ? ($customer->telefon ?: $customer->telefon2) : null;
$to = $client->normalizeMsisdn($storedPhone);
if (env('APP_ENV') !== 'production') {
if (!config('whatsapp.whatsapp_cloud_enabled')) {
$admin = $client->normalizeMsisdn(env('ADMIN_PHONE_NUMBER'));
if (!$admin) {
Log::warning('WhatsApp Cloud skipped: ADMIN_PHONE_NUMBER required when not production', [
Log::warning('WhatsApp Cloud skipped: ADMIN_PHONE_NUMBER required when WHATSAPP_ENABLED is false', [
'norujukan' => $this->norujukan,
]);
$this->logBlast($now, $storedPhone, 'skipped: ADMIN_PHONE_NUMBER empty');
+4 -3
View File
@@ -88,6 +88,7 @@ $app->singleton(
$app->configure('app');
$app->configure('logging');
$app->configure('logviewer');
$app->configure('tinker');
$app->configure('tennant_database');
$app->configure('report');
@@ -110,9 +111,9 @@ $app->configure('kaunter');
// App\Http\Middleware\ExampleMiddleware::class
// ]);
// $app->routeMiddleware([
// 'auth' => App\Http\Middleware\Authenticate::class,
// ]);
$app->routeMiddleware([
'logviewer.password' => App\Http\Middleware\LogViewerPassword::class,
]);
/*
|--------------------------------------------------------------------------
-44
View File
@@ -1,44 +0,0 @@
{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework.",
"keywords": ["framework", "laravel", "lumen"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.2.5",
"auth0/auth0-php": "^7.4",
"laravel/lumen-framework": "^7.0",
"rap2hpoutre/laravel-log-viewer": "^1.7"
},
"require-dev": {
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^8.5"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
]
}
}
-7182
View File
File diff suppressed because it is too large Load Diff
+16
View File
@@ -0,0 +1,16 @@
<?php
return [
'password' => env('LOGVIEWER_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Pattern and storage path settings
|--------------------------------------------------------------------------
|
| The env key for pattern and storage path with a default value
|
*/
'max_file_size' => 52428800, // size in Byte
'pattern' => env('LOGVIEWER_PATTERN', '*.log'),
'storage_path' => env('LOGVIEWER_STORAGE_PATH', storage_path('logs')),
];
+1
View File
@@ -1,6 +1,7 @@
<?php
return [
'whatsapp_cloud_enabled' => env('WHATSAPP_CLOUD_ENABLED', true),
'token' => env('WHATSAPP_TOKEN'),
'phone_number_id' => env('WHATSAPP_PHONE_NUMBER_ID'),
'api_version' => env('WHATSAPP_API_VERSION', 'v25.0'),
+3 -10
View File
@@ -5,6 +5,8 @@ services:
dockerfile: docker/php/Dockerfile
target: development
working_dir: /var/www/html
ports:
- "8080:8000"
volumes:
- ./:/var/www/html:cached
environment:
@@ -12,16 +14,7 @@ services:
APP_DEBUG: "true"
depends_on:
- mysql
web:
image: nginx:1.25-alpine
ports:
- "8080:80"
volumes:
- ./:/var/www/html:cached
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- app
command: ["php", "-S", "0.0.0.0:8000", "-t", "public"]
mysql:
image: mysql:8.0
-257
View File
@@ -1,257 +0,0 @@
APP_NAME=Lumen
APP_ENV=local
APP_KEY=WbPGkYNmXZ6ZQplGlvl0iZ7zyW1b09xa
APP_DEBUG=true
APP_URL=http://api-arrahn.test
APP_TIMEZONE=Asia/Kuala_Lumpur
LOG_CHANNEL=stack
LOG_SLACK_WEBHOOK_URL=
DB_CONNECTION_36=mysql
DB_HOST_36=127.0.0.1
DB_PORT_36=3306
DB_DATABASE_36=arrahn_kb2
DB_USERNAME_36=root
DB_PASSWORD_36=
DB_CONNECTION_2=mysql
DB_HOST_2=127.0.0.1
DB_PORT_2=3306
DB_DATABASE_2=arrahn_wcy
DB_USERNAME_2=root
DB_PASSWORD_2=
DB_CONNECTION_3=mysql
DB_HOST_3=127.0.0.1
DB_PORT_3=3306
DB_DATABASE_3=arrahn_1stop
DB_USERNAME_3=root
DB_PASSWORD_3=
DB_CONNECTION_4=mysql
DB_HOST_4=127.0.0.1
DB_PORT_4=3306
DB_DATABASE_4=arrahn_jlwt
DB_USERNAME_4=root
DB_PASSWORD_4=
DB_CONNECTION_5=mysql
DB_HOST_5=127.0.0.1
DB_PORT_5=3306
DB_DATABASE_5=arrahn_wb
DB_USERNAME_5=root
DB_PASSWORD_5=
DB_CONNECTION_6=mysql
DB_HOST_6=127.0.0.1
DB_PORT_6=3306
DB_DATABASE_6=arrahn_kls
DB_USERNAME_6=root
DB_PASSWORD_6=
DB_CONNECTION_7=mysql
DB_HOST_7=127.0.0.1
DB_PORT_7=3306
DB_DATABASE_7=online_arrahn
DB_USERNAME_7=root
DB_PASSWORD_7=
DB_CONNECTION_8=mysql
DB_HOST_8=127.0.0.1
DB_PORT_8=3306
DB_DATABASE_8=arrahn_pp
DB_USERNAME_8=root
DB_PASSWORD_8=
DB_CONNECTION_9=mysql
DB_HOST_9=127.0.0.1
DB_PORT_9=3306
DB_DATABASE_9=arrahn_mace
DB_USERNAME_9=root
DB_PASSWORD_9=
DB_CONNECTION_10=mysql
DB_HOST_10=127.0.0.1
DB_PORT_10=3306
DB_DATABASE_10=arrahn_pm $
DB_USERNAME_10=root
DB_PASSWORD_10=
DB_CONNECTION_11=mysql
DB_HOST_11=127.0.0.1
DB_PORT_11=3306
DB_DATABASE_11=arrahn_gm
DB_USERNAME_11=root
DB_PASSWORD_11=
DB_CONNECTION_12=mysql
DB_HOST_12=127.0.0.1
DB_PORT_12=3306
DB_DATABASE_12=arrahn_gcl
DB_USERNAME_12=root
DB_PASSWORD_12=
DB_CONNECTION_13=mysql
DB_HOST_13=127.0.0.1
DB_PORT_13=3306
DB_DATABASE_13=arrahn_jli
DB_USERNAME_13=root
DB_PASSWORD_13=
DB_CONNECTION_14=mysql
DB_HOST_14=127.0.0.1
DB_PORT_14=3306
DB_DATABASE_14=arrahn_rp
DB_USERNAME_14=root
DB_PASSWORD_14=
DB_CONNECTION_15=mysql
DB_HOST_15=127.0.0.1
DB_PORT_15=3306
DB_DATABASE_15=arrahn_ktn
DB_USERNAME_15=root
DB_PASSWORD_15=
DB_CONNECTION_16=mysql
DB_HOST_16=127.0.0.1
DB_PORT_16=3306
DB_DATABASE_16=arrahn_pg
DB_USERNAME_16=root
DB_PASSWORD_16=
DB_CONNECTION_17=mysql
DB_HOST_17=127.0.0.1
DB_PORT_17=3306
DB_DATABASE_17=arrahn_skudai
DB_USERNAME_17=root
DB_PASSWORD_17=
DB_CONNECTION_18=mysql
DB_HOST_18=127.0.0.1
DB_PORT_18=3306
DB_DATABASE_18=arrahn_pttn
DB_USERNAME_18=root
DB_PASSWORD_18=
DB_CONNECTION_19=mysql
DB_HOST_19=127.0.0.1
DB_PORT_19=3306
DB_DATABASE_19=arrahn_btg
DB_USERNAME_19=root
DB_PASSWORD_19=
DB_CONNECTION_20=mysql
DB_HOST_20=127.0.0.1
DB_PORT_20=3306
DB_DATABASE_20=arrahn_raub
DB_USERNAME_20=root
DB_PASSWORD_20=
DB_CONNECTION_21=mysql
DB_HOST_21=127.0.0.1
DB_PORT_21=3306
DB_DATABASE_21=arrahn_kgr
DB_USERNAME_21=root
DB_PASSWORD_21=
DB_CONNECTION_22=mysql
DB_HOST_22=127.0.0.1
DB_PORT_22=3306
DB_DATABASE_22=arrahn_sdk
DB_USERNAME_22=root
DB_PASSWORD_22=
DB_CONNECTION_23=mysql
DB_HOST_23=127.0.0.1
DB_PORT_23=3306
DB_DATABASE_23=arrahn_sp
DB_USERNAME_23=root
DB_PASSWORD_23=
DB_CONNECTION_24=mysql
DB_HOST_24=127.0.0.1
DB_PORT_24=3306
DB_DATABASE_24=arrahn_twu
DB_USERNAME_24=root
DB_PASSWORD_24=
DB_CONNECTION_25=mysql
DB_HOST_25=127.0.0.1
DB_PORT_25=3306
DB_DATABASE_25=arrahn_api2
DB_USERNAME_25=root
DB_PASSWORD_25=
DB_CONNECTION_26=mysql
DB_HOST_26=127.0.0.1
DB_PORT_26=3306
DB_DATABASE_26=arrahn_kjg
DB_USERNAME_26=root
DB_PASSWORD_26=
DB_CONNECTION_27=mysql
DB_HOST_27=127.0.0.1
DB_PORT_27=3306
DB_DATABASE_27=arrahn_rl
DB_USERNAME_27=root
DB_PASSWORD_27=
DB_CONNECTION_28=mysql
DB_HOST_28=127.0.0.1
DB_PORT_28=3306
DB_DATABASE_28=arrahn_bfort
DB_USERNAME_28=root
DB_PASSWORD_28=
DB_CONNECTION_29=mysql
DB_HOST_29=127.0.0.1
DB_PORT_29=3306
DB_DATABASE_29=arrahn_kbelud
DB_USERNAME_29=root
DB_PASSWORD_29=
DB_CONNECTION_30=mysql
DB_HOST_30=127.0.0.1
DB_PORT_30=3306
DB_DATABASE_30=arrahn_tuaran
DB_USERNAME_30=root
DB_PASSWORD_30=
DB_CONNECTION_31=mysql
DB_HOST_31=127.0.0.1
DB_PORT_31=3306
DB_DATABASE_31=arrahn_kngau
DB_USERNAME_31=root
DB_PASSWORD_31=
DB_CONNECTION_32=mysql
DB_HOST_32=127.0.0.1
DB_PORT_32=3306
DB_DATABASE_32=arrahn_tm
DB_USERNAME_32=root
DB_PASSWORD_32=
DB_CONNECTION_33=mysql
DB_HOST_33=127.0.0.1
DB_PORT_33=3306
DB_DATABASE_33=arrahn_tmlh
DB_USERNAME_33=root
DB_PASSWORD_33=
DB_CONNECTION_34=mysql
DB_HOST_34=127.0.0.1
DB_PORT_34=3306
DB_DATABASE_34=arrahn_semporna
DB_USERNAME_34=root
DB_PASSWORD_34=
DB_CONNECTION_35=mysql
DB_HOST_35=127.0.0.1
DB_PORT_35=3306
DB_DATABASE_35=arrahn_kb1
DB_USERNAME_35=root
DB_PASSWORD_35=
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
-286
View File
@@ -1,286 +0,0 @@
APP_NAME=Lumen
APP_ENV=localhost
APP_KEY=WbPGkYNmXZ6ZQplGlvl0iZ7zyW1b09xa
APP_DEBUG=true
APP_URL=http://apiujrah.arrahn
APP_TIMEZONE=Asia/Kuala_Lumpur
LOG_CHANNEL=stack
LOG_SLACK_WEBHOOK_URL=
#tukar 12-09-23
#DB_CONNECTION=mysql
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=arrahn_kb2
#DB_USERNAME=root
#DB_PASSWORD=secret
DB_CONNECTION_36=mysql
DB_HOST_36=database_zone1
DB_PORT_36=3306
DB_DATABASE_36=arrahn_kb2
DB_USERNAME_36=root
DB_PASSWORD_36=secret
DB_CONNECTION_2=mysql
DB_HOST_2=database_zone1
DB_PORT_2=3306
DB_DATABASE_2=arrahn_wcy
DB_USERNAME_2=root
DB_PASSWORD_2=secret
DB_CONNECTION_3=mysql
DB_HOST_3=database_zone1
DB_PORT_3=3306
DB_DATABASE_3=arrahn_1stop
DB_USERNAME_3=root
DB_PASSWORD_3=secret
DB_CONNECTION_4=mysql
DB_HOST_4=database_zone1
DB_PORT_4=3306
DB_DATABASE_4=arrahn_jlwt
DB_USERNAME_4=root
DB_PASSWORD_4=secret
DB_CONNECTION_5=mysql
DB_HOST_5=database_zone1
DB_PORT_5=3306
DB_DATABASE_5=arrahn_wb
DB_USERNAME_5=root
DB_PASSWORD_5=secret
DB_CONNECTION_6=mysql
DB_HOST_6=database_zone1
DB_PORT_6=3306
DB_DATABASE_6=arrahn_kls
DB_USERNAME_6=root
DB_PASSWORD_6=secret
DB_CONNECTION_7=mysql
DB_HOST_7=database_zone1
DB_PORT_7=3306
DB_DATABASE_7=online_arrahn
DB_USERNAME_7=root
DB_PASSWORD_7=secret
DB_CONNECTION_8=mysql
DB_HOST_8=database_zone1
DB_PORT_8=3306
DB_DATABASE_8=arrahn_pp
DB_USERNAME_8=root
DB_PASSWORD_8=secret
DB_CONNECTION_9=mysql
DB_HOST_9=database_zone1
DB_PORT_9=3306
DB_DATABASE_9=arrahn_mace
DB_USERNAME_9=root
DB_PASSWORD_9=secret
DB_CONNECTION_10=mysql
DB_HOST_10=database_zone1
DB_PORT_10=3306
DB_DATABASE_10=arrahn_pm
DB_USERNAME_10=root
DB_PASSWORD_10=secret
DB_CONNECTION_11=mysql
DB_HOST_11=database_zone1
DB_PORT_11=3306
DB_DATABASE_11=arrahn_gm
DB_USERNAME_11=root
DB_PASSWORD_11=secret
DB_CONNECTION_12=mysql
DB_HOST_12=database_zone1
DB_PORT_12=3306
DB_DATABASE_12=arrahn_gcl
DB_USERNAME_12=root
DB_PASSWORD_12=secret
DB_CONNECTION_13=mysql
DB_HOST_13=database_zone1
DB_PORT_13=3306
DB_DATABASE_13=arrahn_jli
DB_USERNAME_13=root
DB_PASSWORD_13=secret
DB_CONNECTION_14=mysql
DB_HOST_14=database_zone1
DB_PORT_14=3306
DB_DATABASE_14=arrahn_rp
DB_USERNAME_14=root
DB_PASSWORD_14=secret
DB_CONNECTION_15=mysql
DB_HOST_15=database_zone2
DB_PORT_15=3306
DB_DATABASE_15=arrahn_ktn
DB_USERNAME_15=root
DB_PASSWORD_15=secret
DB_CONNECTION_16=mysql
DB_HOST_16=database_zone2
DB_PORT_16=3306
DB_DATABASE_16=arrahn_pg
DB_USERNAME_16=root
DB_PASSWORD_16=secret
DB_CONNECTION_17=mysql
DB_HOST_17=database_zone2
DB_PORT_17=3306
DB_DATABASE_17=arrahn_skudai
DB_USERNAME_17=root
DB_PASSWORD_17=secret
DB_CONNECTION_18=mysql
DB_HOST_18=database_zone2
DB_PORT_18=3306
DB_DATABASE_18=arrahn_pttn
DB_USERNAME_18=root
DB_PASSWORD_18=secret
DB_CONNECTION_19=mysql
DB_HOST_19=database_zone2
DB_PORT_19=3306
DB_DATABASE_19=arrahn_btg
DB_USERNAME_19=root
DB_PASSWORD_19=secret
DB_CONNECTION_20=mysql
DB_HOST_20=database_zone2
DB_PORT_20=3306
DB_DATABASE_20=arrahn_raub
DB_USERNAME_20=root
DB_PASSWORD_20=secret
DB_CONNECTION_21=mysql
DB_HOST_21=database_zone2
DB_PORT_21=3306
DB_DATABASE_21=arrahn_kgr
DB_USERNAME_21=root
DB_PASSWORD_21=secret
DB_CONNECTION_22=mysql
DB_HOST_22=database_zone2
DB_PORT_22=3306
DB_DATABASE_22=arrahn_sdk
DB_USERNAME_22=root
DB_PASSWORD_22=secret
DB_CONNECTION_23=mysql
DB_HOST_23=database_zone2
DB_PORT_23=3306
DB_DATABASE_23=arrahn_sp
DB_USERNAME_23=root
DB_PASSWORD_23=secret
DB_CONNECTION_24=mysql
DB_HOST_24=database_zone2
DB_PORT_24=3306
DB_DATABASE_24=arrahn_twu
DB_USERNAME_24=root
DB_PASSWORD_24=secret
DB_CONNECTION_25=mysql
DB_HOST_25=database_zone2
DB_PORT_25=3306
DB_DATABASE_25=arrahn_api2
DB_USERNAME_25=root
DB_PASSWORD_25=secret
DB_CONNECTION_26=mysql
DB_HOST_26=database_zone2
DB_PORT_26=3306
DB_DATABASE_26=arrahn_kjg
DB_USERNAME_26=root
DB_PASSWORD_26=secret
DB_CONNECTION_27=mysql
DB_HOST_27=database_zone2
DB_PORT_27=3306
DB_DATABASE_27=arrahn_rl
DB_USERNAME_27=root
DB_PASSWORD_27=secret
DB_CONNECTION_28=mysql
DB_HOST_28=database_zone2
DB_PORT_28=3306
DB_DATABASE_28=arrahn_bfort
DB_USERNAME_28=root
DB_PASSWORD_28=secret
DB_CONNECTION_29=mysql
DB_HOST_29=database_zone2
DB_PORT_29=3306
DB_DATABASE_29=arrahn_kbelud
DB_USERNAME_29=root
DB_PASSWORD_29=secret
DB_CONNECTION_30=mysql
DB_HOST_30=database_zone2
DB_PORT_30=3306
DB_DATABASE_30=arrahn_tuaran
DB_USERNAME_30=root
DB_PASSWORD_30=secret
DB_CONNECTION_31=mysql
DB_HOST_31=database_zone2
DB_PORT_31=3306
DB_DATABASE_31=arrahn_kngau
DB_USERNAME_31=root
DB_PASSWORD_31=secret
DB_CONNECTION_32=mysql
DB_HOST_32=database_zone1
DB_PORT_32=3306
DB_DATABASE_32=arrahn_tm
DB_USERNAME_32=root
DB_PASSWORD_32=secret
DB_CONNECTION_33=mysql
DB_HOST_33=database_zone2
DB_PORT_33=3306
DB_DATABASE_33=arrahn_tmlh
DB_USERNAME_33=root
DB_PASSWORD_33=secret
DB_CONNECTION_34=mysql
DB_HOST_34=database_zone2
DB_PORT_34=3306
DB_DATABASE_34=arrahn_semporna
DB_USERNAME_34=root
DB_PASSWORD_34=secret
DB_CONNECTION_35=mysql
DB_HOST_35=database_zone1
DB_PORT_35=3306
DB_DATABASE_35=arrahn_kb1
DB_USERNAME_35=root
DB_PASSWORD_35=secret
#DB_CONNECTION_37=mysql
#DB_HOST_37=database_zone2
#DB_PORT_37=3306
#DB_DATABASE_37=arrahn_ld
#DB_USERNAME_37=root
#DB_PASSWORD_37=secret
DB_CONNECTION_38=mysql
DB_HOST_38=database_zone2
DB_PORT_38=3306
DB_DATABASE_38=arrahn_pttn2
DB_USERNAME_38=root
DB_PASSWORD_38=secret
CACHE_DRIVER=file
QUEUE_CONNECTION=database
WABOT_API=https://app.wabot.my/api/send.php
WABOT_INSTANCES_ID=67B69A20D329B
WABOT_TOKEN_KEYS=66a08339284bc
ACTIVE_JOB_SERVER=true
-54
View File
@@ -1,54 +0,0 @@
APP_NAME=Lumen
APP_ENV=localhost
APP_KEY=WbPGkYNmXZ6ZQplGlvl0iZ7zyW1b09xa
APP_DEBUG=true
APP_URL=http://apiujrah.arrahn
APP_TIMEZONE=Asia/Kuala_Lumpur
LOG_CHANNEL=stack
LOG_SLACK_WEBHOOK_URL=
#tukar 12-09-23
#DB_CONNECTION=mysql
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=arrahn_kb2
#DB_USERNAME=root
#DB_PASSWORD=secret
DB_CONNECTION_2=mysql
DB_HOST_2=database_zone_franchise
DB_PORT_2=3306
DB_DATABASE_2=kguru_kb
DB_USERNAME_2=root
DB_PASSWORD_2=secret
DB_CONNECTION_3=mysql
DB_HOST_3=database_zone_franchise
DB_PORT_3=3306
DB_DATABASE_3=Kguru_melor
DB_USERNAME_3=root
DB_PASSWORD_3=secret
DB_CONNECTION_4=mysql
DB_HOST_4=database_zone_franchise
DB_PORT_4=3306
DB_DATABASE_4=kguru_tumpat
DB_USERNAME_4=root
DB_PASSWORD_4=secret
DB_CONNECTION_7=mysql
DB_HOST_7=database_zone_franchise
DB_PORT_7=3306
DB_DATABASE_7=master_koopguru
DB_USERNAME_7=root
DB_PASSWORD_7=secret
CACHE_DRIVER=file
QUEUE_CONNECTION=database
WABOT_API=https://app.wabot.my/api/send.php
WABOT_INSTANCES_ID=67B69A20D329B
WABOT_TOKEN_KEYS=66a08339284bc
ACTIVE_JOB_SERVER=true
-54
View File
@@ -1,54 +0,0 @@
APP_NAME=Lumen
APP_ENV=localhost
APP_KEY=WbPGkYNmXZ6ZQplGlvl0iZ7zyW1b09xa
APP_DEBUG=true
APP_URL=http://apiujrah.arrahn
APP_TIMEZONE=Asia/Kuala_Lumpur
LOG_CHANNEL=stack
LOG_SLACK_WEBHOOK_URL=
#tukar 12-09-23
#DB_CONNECTION=mysql
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=arrahn_kb2
#DB_USERNAME=root
#DB_PASSWORD=secret
DB_CONNECTION_3=mysql
DB_HOST_3=database-zone-franchise
DB_PORT_3=3306
DB_DATABASE_3=krk_losong
DB_USERNAME_3=root
DB_PASSWORD_3=secret
DB_CONNECTION_4=mysql
DB_HOST_4=database-zone-franchise
DB_PORT_4=3306
DB_DATABASE_4=krk_kemaman
DB_USERNAME_4=root
DB_PASSWORD_4=secret
DB_CONNECTION_5=mysql
DB_HOST_5=database-zone-franchise
DB_PORT_5=3306
DB_DATABASE_5=krk_tokbali
DB_USERNAME_5=root
DB_PASSWORD_5=secret
DB_CONNECTION_7=mysql
DB_HOST_7=database-zone-franchise
DB_PORT_7=3306
DB_DATABASE_7=master_krk
DB_USERNAME_7=root
DB_PASSWORD_7=secret
CACHE_DRIVER=file
QUEUE_CONNECTION=database
WABOT_API=https://app.wabot.my/api/send.php
WABOT_INSTANCES_ID=67B69A20D329B
WABOT_TOKEN_KEYS=66a08339284bc
ACTIVE_JOB_SERVER=true
+4 -1
View File
@@ -25,7 +25,10 @@ $router->get('/health', function () {
return response()->json(['status' => 'ok']);
});
$router->group(['namespace' => '\Rap2hpoutre\LaravelLogViewer'], function() use ($router) {
$router->group([
'namespace' => '\Rap2hpoutre\LaravelLogViewer',
'middleware' => 'logviewer.password',
], function () use ($router) {
$router->get('logs', 'LogViewerController@index');
});