2017 © Pedro Peláez
 

library laravel-status

Laravel status a simple, automatic Status check for any model based on Laravel.

image

malekbenelouafi/laravel-status

Laravel status a simple, automatic Status check for any model based on Laravel.

  • Thursday, March 8, 2018
  • by malekbenelouafi
  • Repository
  • 1 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 100 % Grown

The README.md

Laravel Status

License Latest Stable Version Total Downloads Latest Unstable Version License composer.lock available Code Intelligence Status Build Status Scrutinizer Code Quality, (*1)

A simple, automatic Status check for any model based on Laravel 4.* - 5.*, (*2)

What are the benefits?

You can check the status of any module with sample way., (*3)

Installation

To get started, require this package, (*4)

  • Via Composer

``` bash composer require malekbenelouafi/laravel-status, (*5)


- Via composer.json file Add the following to the `require` section of your projects `composer.json` file. ``` php "malekbenelouafi/laravel-status": "1.*",

Run composer update to download the package, (*6)

``` bash composer update, (*7)


## Usage #### Migrations When using the migration you should add new column`status`. ``` php $table->tinyInteger('status')->comment('0: inactive; 1: active');

it's will create column status name inside of our database schema, To be ready to receive check the model., (*8)

Simply, the schema seems something like this., (*9)

``` php Schema::create('users', function (Blueprint $table) {, (*10)

$table->increments('id'); $table->tinyInteger('status')->comment('0: inactive; 1: active'); .... .... $table->timestamps(); });, (*11)



#### Models Use this trait in any model. To set up a model to using Uuid, simply use the HasStatus trait: ``` php use Illuminate\Database\Eloquent\Model; use Malekbenelouafi\LaravelStatus\HasStatus; class ExampleModel extends Model { use HasStatus; .... }

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:, (*12)

  • ExampleModel::withInactive(): to get all element together ( all )
  • ExampleModel::withoutInactive(): to get items Without inactive element ( only active ) => by default
  • ExampleModel::onlyInactive(): to get only inactive element

Support

If you are having general issues with this package, feel free to contact me malekbelouafi@gmail.com., (*13)

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., (*14)

If you're using this package, I'd love to hear your thoughts. Thanks!, (*15)

License

The MIT License (MIT). Please see License File for more information., (*16)

The Versions

08/03 2018

dev-master

9999999-dev https://github.com/malekbenelouafi/laravel-status

Laravel status a simple, automatic Status check for any model based on Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

active status inactive check-status

08/03 2018

dev-dev

dev-dev https://github.com/malekbenelouafi/laravel-status

Laravel status a simple, automatic Status check for any model based on Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

active status inactive check-status

08/03 2018

v1.0.0

1.0.0.0 https://github.com/malekbenelouafi/laravel-status

Laravel status a simple, automatic Status check for any model based on Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

active status inactive check-status