ebd3caecc6ddaa6a53decd789e44c11f52454c40
Co-authored-by: ISMAIL MASSERAN <topaz@ISMAILs-Macbook.local> Reviewed-on: #9
DONE: use full name for date in letter, include password in email after membership is done, block ic_number to exclude - (#9)
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/buildexists 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.shfor Laravel setup likephp artisan migrateorstorage:linkif 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
Description
Languages
Vue
47.8%
PHP
36.2%
TypeScript
12.3%
Blade
1.9%
CSS
1.2%
Other
0.4%