docker rmi $(docker images -f "dangling=true" -q)
docker rm $(docker ps -aq) -f
<?php | |
namespace App\GraphQL\Scalars; | |
use Carbon\Carbon; | |
use GraphQL\Error\Error; | |
use GraphQL\Error\InvariantViolation; | |
use Nuwave\Lighthouse\Schema\Types\Scalars\DateTime; | |
/** |
version: '3' | |
services: | |
mysql: | |
image: mysql:5.6 | |
environment: | |
MYSQL_ROOT_PASSWORD: secret | |
MYSQL_DATABASE: swimply | |
volumes: | |
- ./docker/mysql/data/:/var/lib/mysql | |
ports: |
FROM node:8 | |
COPY package.json yarn.lock /api/ | |
WORKDIR /api | |
RUN yarn | |
ADD . /api |
version: '2' | |
services: | |
nginx: | |
image: nginx:1.13.6 | |
volumes: | |
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf | |
- ./:/var/www/html | |
ports: | |
- 8080:80 | |
links: |
version: '2' | |
services: | |
nginx: | |
image: nginx:1.13.6 | |
volumes: | |
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf | |
- ./:/var/www/html | |
ports: | |
- 8080:80 | |
links: |
<?php | |
$api = app('Dingo\Api\Routing\Router'); | |
$api->version('v1', function ($api) { | |
$api->get('ping', function(){ | |
return [ | |
'status' => 'ok', | |
'timestamp' => \Carbon\Carbon::now() | |
]; | |
}); | |
$api->group(['middleware' => ['api.auth', 'throttle:60,1'], 'providers' => ['passport']], function ($api) { |
<?php | |
namespace App\Providers; | |
use Carbon\Carbon; | |
use Laravel\Passport\Passport; | |
use Joselfonseca\LaravelApiTools\Auth\PassportAuthenticationProvider; | |
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; | |
class AuthServiceProvider extends ServiceProvider | |
{ |
<?php | |
namespace Joselfonseca\LaravelApiTools\Auth; | |
use Illuminate\Http\Request; | |
use Dingo\Api\Routing\Route; | |
use Dingo\Api\Auth\Provider\Authorization; | |
use Illuminate\Contracts\Auth\Factory as Auth; | |
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; | |
/** |
<?php | |
namespace Modules\Futinventory\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Joselfonseca\LaravelTactician\CommandBusInterface; | |
/** | |
* Class CommandsServiceProvider | |
* @package Modules\Futinventory\Providers |