Download the PHP package malekbenelouafi/laravel-status without Composer
On this page you can find all versions of the php package malekbenelouafi/laravel-status. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download malekbenelouafi/laravel-status
More information about malekbenelouafi/laravel-status
Files in malekbenelouafi/laravel-status
Package laravel-status
Short Description Laravel status a simple, automatic Status check for any model based on Laravel.
License MIT
Homepage https://github.com/malekbenelouafi/laravel-status
Informations about the package laravel-status
Laravel Status
A simple, automatic Status check for any model based on Laravel 4. - 5.
What are the benefits?
You can check the status of any module with sample way.
Installation
To get started, require this package
-
Via Composer
- Via composer.json file
Add the following to the require
section of your projects composer.json
file.
Run composer update to download the package
Usage
Migrations
When using the migration you should add new columnstatus
.
it's will create column status name inside of our database schema, To be ready to receive check the model.
Simply, the schema seems something like this.
Models
Use this trait in any model.
To set up a model to using Uuid, simply use the HasStatus trait:
Controller
When you create a new instance of a model which uses Status, our package will automatically by deafult get only active items also you can uses this scope methods:
ExampleModel::withInactive()
: to get all element together ( all )ExampleModel::withoutInactive()
: to get items Without inactive element ( only active ) => by defaultExampleModel::onlyInactive()
: to get only inactive element
Support
If you are having general issues with this package, feel free to contact me [email protected].
If you believe you have found an issue, please report it using the GitHub issue tracker, or better yet, fork the repository and submit a pull request.
If you're using this package, I'd love to hear your thoughts. Thanks!
License
The MIT License (MIT). Please see License File for more information.