项目作者: AEngine

项目描述 :
Model and Collection classes
高级语言: PHP
项目地址: git://github.com/AEngine/entity.git
创建时间: 2019-03-05T11:25:43Z
项目社区:https://github.com/AEngine/entity

开源协议:MIT License

下载


AEngine Entity

Some parts of the project were influenced by: Laravel, Symfony Framework’s. Thank you!

Requirements

  • PHP >= 7.0

Installation

Run the following command in the root directory of your web project:

composer require aengine/entity

Usage

Example use Model and Collection (docs for collection by laravel)

  1. class Car extends Model {
  2. public $brand = '';
  3. public $mark = '';
  4. public $color = '';
  5. }
  6. $cars = collect([
  7. new Car(['brand' => 'BMW', 'mark' => 'M4', 'color' => 'red']),
  8. new Car(['brand' => 'BMW', 'mark' => 'X5', 'color' => 'yellow']),
  9. new Car(['brand' => 'Peel', 'mark' => 'P50', 'color' => 'blue']), // Peel Engineering Company
  10. ]);
  11. var_dump($cars);

Contributing

Please see CONTRIBUTING for details.

License

The AEngine Entity is licensed under the MIT license. See License File for more information.