ismailmasseran 59b571d944
Build Docker Image / build-backend (push) Successful in 46s
Build Docker Image / build-frontend (push) Successful in 19s
DONE: fix naming, add transaction for completion of membership application (#12)
Co-authored-by: ISMAIL MASSERAN <topaz@ISMAILs-Macbook.local>
Reviewed-on: #12
2026-07-15 11:35:45 +08:00
2026-06-08 11:37:14 +08:00
2026-06-08 11:37:14 +08:00
2026-07-06 12:50:55 +08:00
2026-07-14 12:03:22 +08:00

MyKOPKB 1.0 Guide

Welcome to MyKOPKB 1.0, the streamlined training deployment setup using Docker, Laravel, and Vite.


🔐 Login Credentials

Use the following to log into the system:

  • Email: isml.msrn11@gmail.com
  • Password: TOPAZTHEGOAT

Laravel command to clear

sail artisan config:clear
sail artisan cache:clear
sail artisan permission:cache-reset

🎯 Addtional Notes to consider

  • Make sure /var/www/public/build exists inside your PHP-FPM container (handled by Dockerfile).
  • Assets are built via Vite in the Node.js stage and injected into the Laravel public/ directory.
  • Use entrypoint.sh for Laravel setup like php artisan migrate or storage:link if needed.
  • 'DEVELOPER' roles can bypassed all permissions by default and cannot be deleted even through database
  • Use delete in controller not directly in routes because no authorization and validation
  • Use Gate for non-model-specific permissions. general-purpose or simple logic,
  • Use policy when need structured authorization for CRUD operations. anything tied to a model/resource
  • Servisibility always higher than siapsiaga
  • Solution — put specific routes first before resource routes
  • to use soft delete, make id and deleted_at as unique

Nwidart Command

  • to make new module, run:
sail artisan module:make Example
  • create migration in module
sail artisan module:make-migration add_more_details_to_users_table User

Run specific laravel migration:

  • If it is fresh, then run:
sail artisan migrate --path=database/migrations/2025_07_30_044653_create_historical_pkj_perjawatan_table.php
  • If not, rollback first:
sail artisan migrate:rollback --step=1

sail artisan migrate --path=database/migrations/2025_07_30_044708_create_historical_pkj_pegangan_status_table.php

To remove data in postgres and restart numbering

TRUNCATE TABLE kjc_spare_parts RESTART IDENTITY;

Reset query numbering

SELECT pg_get_serial_sequence('"permissions"', 'id') AS seq_name;
SELECT last_value FROM public.permissions_id_seq;
SELECT setval('public.permissions_id_seq', COALESCE((SELECT MAX(id) FROM permissions), 0) + 1, false);

Git

DO NOT RUN THIS BECAUSE IT WILL REMOVE ALL THE UNTAGGED FILES IN LOCAL

git reset --hard development # moves the current branch (e.g., main) to point exactly where development

Public endpoint to apply membership:

http://localhost:5173/apply-membership

S
Description
No description provided
Readme 8.7 MiB
Languages
Vue 47.8%
PHP 36.2%
TypeScript 12.3%
Blade 1.9%
CSS 1.2%
Other 0.4%