Package Data | |
---|---|
Maintainer Username: | agoransson |
Maintainer Contact: | andreasgoransson0@gmail.com (Andreas Göransson) |
Package Create Date: | 2015-10-16 |
Package Last Update: | 2016-04-10 |
Language: | PHP |
License: | Apache-2.0 |
Last Refreshed: | 2024-11-14 15:18:43 |
Package Statistics | |
---|---|
Total Downloads: | 234 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Under development!
#install
This assumes you've already installed Laravel 5.1.19 (neoeloquent is not compatible with later changes to the builder in Laravel)
Install package with composer require wetcat/litterbox-api dev-master
Add provider
Wetcat\Litterbox\LitterboxServiceProvider::class,
Publish config php artisan vendor:publish
and modify to suit your Neo server.
Update configs.
Add datbase settings
'default' => 'neo4j',
'connections' => [
'neo4j' => [
'driver' => 'neo4j',
'host' => 'localhost',
'port' => '7474',
'username' => null,
'password' => null
]
]
App\Http\Kernel.php
protected $routeMiddleware = [
'cors' => Barryvdh\Cors\HandleCors::class,
'litterbox-guest' => \Wetcat\Litterbox\Middleware\Guest::class,
'litterbox-auth' => \Wetcat\Litterbox\Middleware\Auth::class,
'litterbox-order' => \Wetcat\Litterbox\Middleware\Order::class,
'litterbox-admin' => \Wetcat\Litterbox\Middleware\Admin::class,
'litterbox-superadmin' => \Wetcat\Litterbox\Middleware\Superadmin::class,
];
app\config\cors.php
return [
'supportsCredentials' => false,
'allowedOrigins' => ['*'],
'allowedHeaders' => ['Content-Type', 'Accept', 'X-Litterbox-Token'],
'allowedMethods' => ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
'exposedHeaders' => [],
'maxAge' => 0,
'hosts' => [],
]
app\Http\Kernel.php
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
//\App\Http\Middleware\VerifyCsrfToken::class,
];