fontenele / larange
此包已被弃用且不再维护。未建议替换包。
Laravel + PHP + RequireJS + Angular + Bootstrap
v1.2.8
2016-10-08 17:39 UTC
Requires
- php: >=5.5.9
- barryvdh/laravel-ide-helper: ~2.0
- laracasts/flash: ~1.3
- laravel/framework: 5.1
- lucadegasperi/oauth2-server-laravel: 4.0.x@dev
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: 0.9.*
- phpspec/phpspec: ~2.1
- phpunit/phpunit: ~4.0
README
PHP/JS 框架
- [Laravel 5.1] (https://github.com/laravel/laravel)
- [AngularJS] (https://github.com/angular/angular)
- [RequireJS] (https://github.com/requirejs/requirejs)
- [Twitter Bootstrap] (https://github.com/twbs/bootstrap)
- 使用 OAuth2 进行身份验证 - JSON Web Token,通过 [Sattelizer (基于令牌的 AngularJS 身份验证)] (https://github.com/sahat/satellizer) 和 [oauth2-server-laravel (Laravel OAuth2 服务器)] (https://github.com/lucadegasperi/oauth2-server-laravel) 插件
- 按路由动态加载视图、js 和 json
- 每月维护
- 代码简单
安装
通过 Composer 创建项目
$ composer create-project fontenele/larange larange
$ php artisan init-db
手动克隆和安装
- 克隆仓库
$ git clone https://github.com/fontenele/larange.git && cd larange
- 设置存储目录的写入权限
$ chmod -Rf 777 storage
- 安装 PHP 库
$ composer install
- 安装 JS 库
$ bower install
(如果你使用 Docker 或类似工具且你是 root 用户,请使用$ bower install --allow-root
) - 在 .local.env 文件中配置数据库
- 如果你不使用 PostgreSQL,编辑 config/database.php 文件并更改数据库驱动
- 发布供应商
$ php artisan vendor:publish
- 创建用户表
$ php artisan migrate
- 播种用户
$ php artisan db:seed
- 测试应用
$ php artisan serve
测试偏差
- 登录: guilherme@fontenele.net
- 密码:secret
感谢
- [@chenkie] (https://github.com/chenkie) 与 [jot-bot] (https://github.com/chenkie/jot-bot) 项目,展示如何在 Laravel 和 Angular 中使用 JWT
- [@eu81273] (https://github.com/eu81273) 与 [AngularJS-RequireJS-Sample-Project] (https://github.com/eu81273/AngularJS-RequireJS-Sample-Project) 项目,他在旧版本中集成了 RequireJS 和 AngularJS,但这是理解它们如何协同工作的基础,并使它们在新版本中正常工作
- [@andreymor] (https://github.com/andreymor) 在 AngularJS 架构和 OAuth2 流程方面帮助了我