Download the PHP package tadasei/laravel-statuses without Composer
On this page you can find all versions of the php package tadasei/laravel-statuses. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-statuses
Tadasei/laravel-statuses
This package provides stubs for statuses association to Eloquent models.
Features
- Quickly generate statuses handling utilities.
- Customize and extend generated code to fit your project's needs.
- Improve development efficiency by eliminating repetitive tasks.
Installation
You can install the package via Composer by running:
Publishing statuses handling utilities
To publish statuses handling utilities, use the following command:
Configuring Statusable Models
To extend or define which models are considered statusable:
- Define a One-to-Many relationship with your model (one
App\Models\Statushas manyApp\Models\YourModel). - Add your model class name to the
App\Enums\StatusableTypeenum.
This allows full flexibility in defining how your application links statuses to models.
Running migrations
To create the related statuses table, run the generated migration using the following command:
Register CRUD routes
This package generates a routes/resources/status.php route file among its utilities. You can include this file in your routes/web.php or routes/api.php to enable authenticated and authorized App\Models\Status model CRUD operations.
Usage:
The usage is the same as any regular One-to-Many relationship:
Customization
The generated code serves as a starting point. You can customize and extend it according to your project's requirements. Modify the generated utilities as needed.
Contributing
Contributions are welcome! If you have suggestions, bug reports, or feature requests, please open an issue on the GitHub repository.
License
This package is open-source software licensed under the MIT license.
All versions of laravel-statuses with dependencies
illuminate/console Version ^9.0|^10.0|^11.0
illuminate/filesystem Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.0
illuminate/validation Version ^9.0|^10.0|^11.0