PHPackages                             msamec/mcl - 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. msamec/mcl

ActiveLibrary

msamec/mcl
==========

07PHP

Since Jul 21Pushed 11y ago1 watchersCompare

[ Source](https://github.com/msamec/mcl)[ Packagist](https://packagist.org/packages/msamec/mcl)[ RSS](/packages/msamec-mcl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

mcl
===

[](#mcl)

Quick start
===========

[](#quick-start)

### Required setup

[](#required-setup)

In the require key of composer.json file add the following

```
"msamec/mcl": "dev-master"
```

Run the Composer update comand

```
$ composer update
```

In your config/app.php add 'Msamec\\Mcl\\MclServiceProvider' to the end of the $providers array

```
'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Msamec\Mcl\MclServiceProvider',

),
```

### Usage

[](#usage)

#### Model

[](#model)

In models directory instead of creating .php file, create folder with the same name you would name previous said model. For example if you wanted to create model User.php, instead you would create folder Something. Inside that folder create .php file named Main.php. This file will be used as a fallback if a file for certain role does not exist. It should look something like this:

```
|-- app
|   |-- models
|   |   |-- Something
|   |   |   |-- Main.php
```

Main.php must have namespace because for every model(folder) you create, it must contain class Main.

Example:

```
