Download the PHP package roberts/support without Composer
On this page you can find all versions of the php package roberts/support. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download roberts/support
More information about roberts/support
Files in roberts/support
Package support
Short Description Common functions used in Laravel packages
License MIT
Homepage https://github.com/roberts/support
Informations about the package support
Common functions used in Laravel packages
Traits, Helper functions, and scaffolding tools for Laravel packages & applications.
🚀 Quick Start: Project Scaffolding
Quickly set up GitHub Workflow, Actions and Docker:
This automatically generates:
- ✅ GitHub Actions workflows (tests, PHPStan, linting)
- ✅ Docker configuration for Cloud Run
- ✅ PHPStan configuration
- ✅ VS Code workspace settings
Scaffolding Documentation →
Features
Project Scaffolding
- Auto-detect project type (Laravel app or package)
- Smart detection of features (Flux, Filament, Twitter, Mail)
- One command to set up complete CI/CD pipeline
- Google Cloud Run deployment ready
Model Traits
- HasCreator
- HasUpdater
Model Traits for Status
- HasActiveStatus
- HasApplicationStatus
- HasApprovalStatus
- HasModeratorStatus
- HasOrderStatus
- HasProcessingStatus
- HasPublishingStatus
- HasSubscriptionStatus
Installation
You can install the package via composer:
Usage
On packages or Laravel applications that require this package, you can add the Traits to models like:
You may only add 1 of the Status Traits since they all use the same status database column. They are not designed to work together but to replace the functionality with the Enum structures.
Expected Columns
When using any of the Status Traits on a model, add the following format for the status database column on your table:
status(string (25 character max), nullable, index)
Note: Status traits automatically set appropriate default values when models are created (e.g., pending for moderator status, active for active status).
When using the HasCreator and/or HasUpdater traits on a model, add the following nullable columns to your table:
creator_id(unsignedBigInteger, nullable)updater_id(unsignedBigInteger, nullable)
Example migration snippet:
The traits automatically:
- Set
creator_idon model creating (when an authenticated user is present). - Set
updater_idon model saving (create and update) when an authenticated user is present.
Overriding the Auth Provider Model
By default, the creator & updater traits resolve the related user model from config('auth.providers.users.model').
If your application uses a different provider or model, ensure the config points to your user class. For example, in config/auth.php:
Or override at runtime (e.g., inside a service provider) if needed:
Enums
Status traits use enums with the following values, setting the first one on model creation:
HasActiveStatus: active, inactiveHasApplicationStatus: pending, started, verified, applied, accepted, rejectedHasApprovalStatus: pending, submitted, approved, rejectedHasModeratorStatus: pending, flagged, approved, rejectedHasOrderStatus: cart, pending, checkout, paid, shipped, delivered, canceledHasProcessingStatus: pending, processing, completed, failedHasPublishingStatus: draft, scheduled, published, archivedHasSubscriptionStatus: trial, active, canceled, expired
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- Drew Roberts
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of support with dependencies
spatie/laravel-package-tools Version ^1.93
illuminate/contracts Version ^13.0