oburatongoi/productivity
Composer 安装命令:
composer require oburatongoi/productivity
包简介
Productivity - A productivity API by Artisan Pixelworks
关键字:
README 文档
README
Installation
Compatible with Laravel 5. To install, run:
$ composer install oburatongoi/productivity.
Next, add the service provider to the provider array in the app/config.app file:
Oburatongoi\Productivity\Providers\ProductivityServiceProvider::class,
In your .env file, add the following variables:
SESSION_DOMAIN=.your-domain.com Note the '.' before the domain name.
PRODUCTIVITY_LOGO=logo-text defaults to 'Productivity'
PRODUCTIVITY_DOMAIN=your-domain.com
PRODUCTIVITY_SUBDOMAIN=productivity
If using Scout with Algolia, set the following environment variables
FOLDER_INDEX_NAME=the-name-of-your-folder-index defaults to prod_FOLDERS
CHECKLIST_INDEX_NAME=the-name-of-your-folder-index defaults to prod_CHECKLISTS
Be sure to update your DNS 'A' or 'CNAME' settings to include the new name and add SSL encryption for your desired subdomain if you do not have wildcard subdomain encryption.
Next, publish the package's views, migrations and routes:
$ php artisan vendor:publish
You will need to force publish the productivity config. Note that this will add or overwrite the following files in the config folder: productivity.php, fakeid.php and javascript.php:
php artisan vendor:publish --tag=productivity --force
Next, add the Productive trait to your app's User model:
use Oburatongoi\Productivity\Traits\Productive; class User extends Authenticatable { use Notifiable, Productive; // ... User class methods }
To properly address certain exceptions, add the following to your app\Exceptions\Handler.php file:
use Illuminate\Session\TokenMismatchException as TokenMismatchException; use AlgoliaSearch\AlgoliaException as AlgoliaException; use Bugsnag; class Handler extends ExceptionHandler { /** * A list of the exception types that should not be reported. * * @var array */ protected $dontReport = [ \Illuminate\Session\TokenMismatchException::class, \AlgoliaSearch\AlgoliaException::class, ]; /** * Report or log an exception. * * This is a great spot to send exceptions to Sentry, Bugsnag, etc. * * @param \Exception $exception * @return void */ public function report(Exception $exception) { Bugsnag::notifyException($exception); parent::report($exception); } /** * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request * @param \Exception $exception * @return \Illuminate\Http\Response */ public function render($request, Exception $exception) { if ($exception instanceof TokenMismatchException) { Bugsnag::notifyException($exception); if ($request->expectsJson()) return response()->json([ 'tokenMismatch' => true, 'input' => $request->except(['password']), 'url' => $request->fullUrl(), 'method' => $request->method(), 'token' => csrf_token() ]); } if ($exception instanceof AlgoliaException) { Bugsnag::notifyException($exception); if ($request->expectsJson()) return response()->json([ 'algoliaException' => true, 'input' => $request->except(['password']) ]); } return parent::render($request, $exception); }
Finally, run the migration to add productivity's folders to the database. Note that productivity's tables all have the productivity_ prefix, so make sure you don't have any naming conflicts in your database:
$ php artisan migrate
Getting Started
When adding Productivity to a fresh Laravel installation, consider doing the following:
- Change app name in config/app
- Install Bugsnag
- Install and Configure Algolia
- Install and Configure Redis
- Install and Configure JosephSilber/bouncer package
oburatongoi/productivity 适用场景与选型建议
oburatongoi/productivity 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 320 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 01 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「productivity」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 oburatongoi/productivity 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 oburatongoi/productivity 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 oburatongoi/productivity 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Reverts the drop down save buttons in the backend to 3 single buttons
Record and replay Laravel requests deterministically and generate tests from production traces.
Alfabank REST API integration
Bundle Javascript & Stylesheets from package.json (Yarn) with PHP.
Command Line todo list app
Russian Productivity Calendar
统计信息
- 总下载量: 320
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-07