mpociot / illuminate-contao
PHP project.
0.1.0
2015-10-20 07:54 UTC
Requires
- illuminate/cache: 4.2.8
- illuminate/database: 4.2.8
- illuminate/filesystem: 4.2.8
- illuminate/translation: 4.2.8
- illuminate/validation: 4.2.8
Requires (Dev)
- phpunit/phpunit: 4.7.*
This package is auto-updated.
Last update: 2024-11-24 10:46:55 UTC
README
Use Laravel classes in Contao CMS (WIP)
Installation via Composer
$ composer require mpociot/illuminate-contao
Usage
Validation
Important You need to copy the validation.php into this Contao directory:
TL_ROOT /system/lang/en/validation.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
$ composer test
License
This library is licensed under the MIT license. Please see License file for more information.