entrust
entrust copied to clipboard
Update EntrustServiceProvider.php
trafficstars
Key Improvements
Better Code Structure
- Split large methods into smaller, single-responsibility methods
- Grouped related methods together for better organization
Modern PHP Features
- Used arrow functions where appropriate
- Added explicit return types to methods
- Replaced anonymous functions with
fn()for simple callbacks
Readability Improvements
- Clearer and more descriptive comments
- Better method and variable naming
- Removed duplicate and unnecessary code
Performance and Optimization
- Replaced
app()->basePath()withconfig_path()for cleaner config access - Added
tagsupport for publishing configuration
Service Provider Enhancements
- Extended the
provides()method to include the'entrust'service
Backward Compatibility
- No changes to existing logic
- All previous behavior is preserved
- Fully compatible with earlier versions