shpasser/gae-support
Composer 安装命令:
composer require shpasser/gae-support
包简介
Google App Engine Support for Laravel apps.
README 文档
README
Google App Engine(GAE) Support package for Laravel 4.
Currently supported features:
- Generation of general configuration files,
- Mail service provider,
- Queue service provider.
For Laravel 5 see https://github.com/shpasser/GaeSupportL5.
For Lumen see https://github.com/shpasser/GaeSupportLumen.
Installation
Pull in the package via Composer.
"require": { "shpasser/gae-support": "~1.0" }
Then include the service provider within app/config/app.php.
'providers' => [ 'Shpasser\GaeSupport\GaeSupportServiceProvider' ];
Usage
Generate the GAE related files / entries.
php artisan gae:setup --config your-app-id
The default GCS bucket is configured unless a custom bucket id is defined using
the --bucket option.
php artisan gae:setup --config --bucket="your-bucket-id" your-app-id
The mail driver configuration file can be found at app/config/production/mail.php,
it is one of many configuration files generated by the artisan command. There is
no need in any kind of custom configuration. All the outgoing mail messages are sent
with sender address of an administrator of the application, i.e. admin@your-app-id.appspotmail.com.
The sender, to, cc, bcc, replyTo, subject, body and attachment
parts of email message are supported.
Queues
The generated queue configuration file app/config/production/queue.php should contain:
return array( 'default' => 'gae', /* |-------------------------------------------------------------------------- | GAE Queue Connection |-------------------------------------------------------------------------- | */ 'connections' => array( 'gae' => array( 'driver' => 'gae', 'queue' => 'default', 'url' => '/tasks', 'encrypt' => true, ), ), );
The 'default' queue and encryption are used by default.
In order to use the queue your app/routes.php file should contain the following route:
Route::post('tasks', array('as' => 'tasks', function() { return Queue::marshal(); }));
This route will be used by the GAE queue to push the jobs. Please notice that the route and the GAE Queue Connection 'url' parameter point to the same URL. For more information on the matter please see http://laravel.com/docs/4.2/queues#push-queues.
Deploy
Download and install GAE SDK for PHP and deploy your app.
shpasser/gae-support 适用场景与选型建议
shpasser/gae-support 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8.77k 次下载、GitHub Stars 达 15, 最近一次更新时间为 2014 年 11 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 shpasser/gae-support 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 shpasser/gae-support 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 8.77k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-11-24