PHPackages                             hqq/scenario - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. hqq/scenario

ActiveLibrary[Framework](/categories/framework)

hqq/scenario
============

A Package for set Scenario in Laravel

0.0.2(8y ago)153MITPHP

Since Jul 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Mr-Hqq/Scenario)[ Packagist](https://packagist.org/packages/hqq/scenario)[ RSS](/packages/hqq-scenario/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Scenario For Laravel
====================

[](#scenario-for-laravel)

- This package compatible with Laravel `>=5`
- This package help you out to make model from database and set scenario for it.

Run the Composer update comand

```
$ composer require hqq/scenario

```

Or if you using phpStorm , you can use Tools &gt; Composer &gt; Add Dependency

In your `config/app.php` add `hqq\scenario\ScenarioServiceProvider::class,` to the end of the `$providers` array

```
'providers' => [

    Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
    Illuminate\Auth\AuthServiceProvider::class,
    ...
    hqq\scenario\ScenarioServiceProvider::class,

],
```

Usage cmodel
------------

[](#usage-cmodel)

#### in artisan console write

[](#in-artisan-console-write)

#### `php artisan make:cmodel table_name`

[](#php-artisan-makecmodel-table_name)

Example Model
-------------

[](#example-model)

```
