2017 © Pedro Peláez
 

library illuminate-contao

PHP project.

image

mpociot/illuminate-contao

PHP project.

  • Tuesday, October 20, 2015
  • by mpociot
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

IlluminateContao

Use Laravel classes in Contao CMS (WIP), (*1)

Installation via Composer

``` bash $ composer require mpociot/illuminate-contao, (*2)


## Usage ### Validation **Important** You need to copy the [validation.php](https://github.com/laravel/laravel/blob/v4.2.11/app/lang/en/validation.php) into this Contao directory: `TL_ROOT /system/lang/en/validation.php` ```php use Mpociot\IlluminateContao\Validator; $validator = Validator::make([], [ "ean" => "required" ]); if( $validator->fails() ) { $errors = $validator->errors(); }

Eloquent / Database

<?php
use Mpociot\IlluminateContao\EncapsulatedEloquentBase;

class UserProfile extends EncapsulatedEloquentBase
{

    protected $table = "user_profile";

    public function user()
    {
        return $this->belongsTo('User');
    }

}

Running Tests

bash $ composer test, (*3)

License

This library is licensed under the MIT license. Please see License file for more information., (*4)

The Versions