stwt / mothership
该软件包最新版本(1.0.1)没有可用的许可证信息。
基于 Laravel 的 CRUD 应用程序框架。
该软件包的规范存储库似乎已消失,因此该软件包已被冻结。
1.0.1
2014-01-09 13:34 UTC
Requires
- php: >=5.4.0
- cartalyst/sentry: 2.0.*
- cviebrock/eloquent-sluggable: 1.0.*
- illuminate/support: 4.1.*
- jasonlewis/expressive-date: 1.0.*
- laravelbook/ardent: dev-master
- venturecraft/revisionable: 1.*
This package is not auto-updated.
Last update: 2022-12-24 05:01:02 UTC
README
基于 Laravel 的管理应用程序框架。
特性
- 快速设置 CRUD 管理应用程序
- 自动生成适合您的模型表单
- Twitter Bootstrap 样式表
要求
- Laravel 4
- PHP 5.4.*
安装
将以下内容添加到您的根 composer.json 文件中
"stwt/mothership": "*"
使用 composer update 更新您的包,或使用 composer install 安装。
更新 app.php
Composer 安装或更新您的包后,您需要将 Mothership 注册到 Laravel。打开 app/config/app.php 并将以下内容添加到 providers 键。
'Stwt\Mothership\MothershipServiceProvider',
接下来,您需要将 Mothership 的外观别名化。找到 aliases 键,它应该在 providers 键下面。
'Mothership' => 'Stwt\Mothership\Mothership',
资源
Mothership 包含软件包资源(CSS & JS 文件)。将这些发布到您的 public 目录。
php artisan asset:publish stwt/mothership
配置
Mothership 还包含一个配置文件。将这些发布到您的 app/config 目录。
php artisan config:publish stwt/mothership
最后,运行 composer dump-autoload 以更新您的自动加载类映射。
创建您的第一个 Mothership
模型
要在 Mothship 中使用的任何模型都应扩展 MothershipModel 类。
use Stwt\Mothership\MothershipModel as MothershipModel;
class Thing extends MothershipModel {
//...
}
控制器
资源控制器应扩展 MothershipResourceController 类。
use Stwt\Mothership\MothershipResourceController as MothershipResourceController;
class ThingController extends MothershipResourceController {
//...
}
路由
将新的资源控制器添加到您的 app/routes.php 文件。
Route::resource('admin/things', 'ThingController');
完成。