Download the PHP package turahe/laravel-userstamps without Composer
On this page you can find all versions of the php package turahe/laravel-userstamps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download turahe/laravel-userstamps
More information about turahe/laravel-userstamps
Files in turahe/laravel-userstamps
Package laravel-userstamps
Short Description Adds user tracking fields to Laravel models.
License MIT
Homepage https://github.com/turahe/laravel-userstamps
Informations about the package laravel-userstamps
Laravel Userstamps
A Laravel package to automatically add created_by
, updated_by
, and deleted_by
fields to your Eloquent models, with enhanced configuration options, custom column types, and comprehensive testing infrastructure.
Features
- Core Functionality: Automatically tracks which user created, updated, or deleted a model
- Enhanced Configuration: Advanced options for customizing column types, names, and behavior
- Custom UserStamps: Support for custom column configurations and advanced use cases
- Multi-Database Support: Works with MySQL, PostgreSQL, and SQLite
- Laravel Compatibility: Supports Laravel 10, 11, and 12
- Database Schema Macros: Easy-to-use schema macros for userstamps
- Comprehensive Testing: GitHub Actions CI/CD with multi-database testing
- Docker Integration: Complete Docker setup for local development and testing
- Code Quality: Laravel Pint integration and security scanning
Installation
Usage
1. Basic Usage with HasUserStamps
2. Advanced Usage with HasCustomUserStamps
3. Database Schema
Add the userstamps columns using the provided schema macros:
Configuration
Publish Configuration
Enhanced Configuration Options
The package now supports advanced configuration for customizing column behavior:
Supported Column Types
increments
- Auto-incrementing integerbigIncrements
- Auto-incrementing big integer (default)uuid
- UUID stringulid
- ULID stringbigInteger
- Big integerinteger
- Regular integerstring
- Variable-length stringtext
- Long textchar
- Fixed-length string
Testing
Local Testing with Docker
Requirements: Docker, PHP 8.2+, Composer
Test Scripts
The package includes PowerShell and shell scripts for automated testing:
- Windows:
scripts/test-all.ps1
- Linux/macOS:
scripts/test-all.sh
GitHub Actions CI/CD
- Matrix tests for Laravel 12 and PHP 8.4
- Multi-database testing (MySQL and PostgreSQL)
- Code style checking with Laravel Pint
- Security scanning with Composer Audit and CodeQL
Documentation
For detailed information on advanced features:
- Enhanced Configuration - Advanced configuration options and custom column types
- Docker Setup - Complete Docker environment setup
- Docker Setup Summary - Quick Docker setup guide
Docker Setup
The package includes a complete Docker testing environment:
- MySQL 8.0:
127.0.0.1:3306
, user:laravel_userstamps
, pass:password
- PostgreSQL 15:
127.0.0.1:5432
, user:laravel_userstamps
, pass:password
- Redis 7:
127.0.0.1:6379
See DOCKER_README.md for full setup instructions.
Security
- Composer audit and CodeQL scanning in CI
- Dependabot for automated dependency updates
- Regular security vulnerability scanning
Contributing
- Fork the repo
- Create your feature branch (
git checkout -b feature/foo
) - Commit your changes
- Push to the branch (
git push origin feature/foo
) - Open a pull request
License
MIT © Nur Wachid