anekdotes/staticmodel
Composer 安装命令:
composer require anekdotes/staticmodel
包简介
Abstract class used to create static Model classes. These classes have their data initiated in themselves. Allows Model operations to be used to a certain extent.
README 文档
README
Abstract class used to create static Model classes. These classes have their data initiated in themselves. Allows Model operations to be used to a certain extent.
Installation
Install via composer into your project:
composer require anekdotes/staticmodel
Usage
Create your static class by inheriting StaticModel. Fill it with your static data.
class Languages extends StaticModel { public static $data = array( array( 'id' => 1, 'name' => 'English', 'small' => 'en' ) ); }
You can then call the model as any other Illuminate model, and use most of Illuminate's functionalities.
$english = Languages::find(1); $englishname = $english->name;
统计信息
- 总下载量: 404
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-29