Download the PHP package kuroragi/general-helper without Composer
On this page you can find all versions of the php package kuroragi/general-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kuroragi/general-helper
More information about kuroragi/general-helper
Files in kuroragi/general-helper
Package general-helper
Short Description General helpers, blameable trait, activity log service, and macros for Laravel.
License MIT
Homepage https://github.com/kuroragi/general-helper
Informations about the package general-helper
# Kuroragi General Helper
A Laravel utility package for ERP and general applications provides a Blameable trait, activity logging, Blueprint/Eloquent macros, authorization exception handling, and common helper functions for Bahasa Indonesia formatting.
Compatible with Laravel 10, 11, and 12.
Requirements
- PHP ^8.1
- Laravel ^10.0 | ^11.0 | ^12.0
Optional Dependencies
spatie/laravel-permissionfor role/permission-based authorization exception handlingbarryvdh/laravel-dompdffor PDF generation features
Installation
The service provider is auto-discovered via Laravel package auto-discovery.
Publish Config
Configuration
config_versioncompare your local value with the package source after upgrading. If lower, re-publish to get new config keys.
Features
1. Blameable Trait
Auto-fills created_by, updated_by, deleted_by on Eloquent model events.
Migration:
Model:
Relations are available automatically:
2. Blueprint Migration Macros
3. Eloquent Query Macros
4. Activity Logger
Daily log files stored at storage/logs/activity/activity-YYYY-MM-DD.log. Each line is a JSON object.
5. Activity Log Reader
Also reads from .zip archives generated by the roll command.
6. Weekly Log Rotation
Logs are auto-compressed to a weekly .zip archive every Monday at 01:00 (configurable).
Ensure the Laravel Scheduler is running:
7. Authorization Exception Handler
Handles AuthorizationException (403) with configurable redirect and flash message instead of a raw error page.
Blade:
redirect_type |
Behaviour |
|---|---|
route |
redirect()->route($redirect_to) |
url |
redirect($redirect_to) |
back |
redirect()->back() |
home |
redirect('/') |
Returns a JSON 403 response for AJAX/Livewire requests when json_response is true.
8. General Helper Functions
Testing
Package Structure
Changelog
See CHANGELOG.md for full history.
License
The MIT License (MIT).
All versions of general-helper with dependencies
laravel/framework Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
spatie/laravel-permission Version ^5.5|^6.0|^7.0|^8.0
barryvdh/laravel-dompdf Version ^2.0|^3.0|^4.0
livewire/livewire Version ^3.0|^4.0