oburatongoi / productivity
Productivity - A productivity API by Artisan Pixelworks
Installs: 320
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 2
Language:Vue
Requires
- algolia/algoliasearch-client-php: ^1.15
- chocoholics/exceptional: ^0.0.4
- doctrine/dbal: ^2.5
- genealabs/laravel-caffeine: ^0.4.2
- illuminate/support: ~5
- kalnoy/nestedset: ^4.2
- laracasts/utilities: ~2.0
- laravel/scout: ^3.0
- propaganistas/laravel-fakeid: ^2.0
- silber/bouncer: v1.0.0-beta.4
- dev-master
- 0.4.45
- 0.4.44
- 0.4.43
- 0.4.42
- 0.4.41
- 0.4.40
- 0.4.39
- 0.4.38
- 0.4.37
- 0.4.36
- 0.4.35
- 0.4.34
- 0.4.33
- 0.4.32
- 0.4.31
- 0.4.30
- 0.4.29
- 0.4.28
- 0.4.27
- 0.4.26
- 0.4.25
- 0.4.24
- 0.4.23
- 0.4.22
- 0.4.21
- 0.4.20
- 0.4.19
- 0.4.18
- 0.4.17
- 0.4.16
- 0.4.15
- 0.4.14
- 0.4.13
- 0.4.12
- 0.4.11
- 0.4.10
- 0.4.9
- 0.4.8
- 0.4.7
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.40
- 0.3.39
- 0.3.38
- 0.3.37
- 0.3.36
- 0.3.35
- 0.3.34
- 0.3.33
- 0.3.32
- 0.3.31
- 0.3.30
- 0.3.29
- 0.3.28
- 0.3.27
- 0.3.26
- 0.3.25
- 0.3.24
- 0.3.23
- 0.3.22
- 0.3.21
- 0.3.20
- 0.3.19
- 0.3.18
- 0.3.17
- 0.3.16
- 0.3.15
- 0.3.14
- 0.3.13
- 0.3.12
- 0.3.11
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.36
- 0.1.35
- 0.1.34
- 0.1.33
- 0.1.32
- 0.1.31
- 0.1.30
- 0.1.29
- 0.1.28
- 0.1.27
- 0.1.26
- 0.1.25
- 0.1.24
- 0.1.23
- 0.1.22
- 0.1.21
- 0.1.20
- 0.1.19
- 0.1.18
- 0.1.17
- 0.1.16
- 0.1.15
- 0.1.14
- 0.1.13
- 0.1.12
- 0.1.11
- 0.1.10
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.13
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
This package is auto-updated.
Last update: 2024-11-05 19:09:58 UTC
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