Skip to content

Instantly share code, notes, and snippets.

@bartjakobs
Last active January 28, 2019 09:16
Show Gist options
  • Select an option

  • Save bartjakobs/57986122a72e297b0bd348a4737ce35f to your computer and use it in GitHub Desktop.

Select an option

Save bartjakobs/57986122a72e297b0bd348a4737ce35f to your computer and use it in GitHub Desktop.

Revisions

  1. bartjakobs revised this gist Jan 28, 2019. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion 2 - bootstrap - app.php
    Original file line number Diff line number Diff line change
    @@ -30,6 +30,5 @@ function ($app) {
    //bla

    $app->register(Tymon\JWTAuth\Providers\LumenServiceProvider::class);
    $app->register(Geocoder\Laravel\Providers\GeocoderService::class);
    $app->register(Barryvdh\Cors\ServiceProvider::class);
    $app->register (Sentry\SentryLaravel\SentryLumenServiceProvider::class);
  2. bartjakobs revised this gist Jan 28, 2019. 5 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
    File renamed without changes.
    File renamed without changes.
    File renamed without changes.
  3. bartjakobs created this gist Jan 28, 2019.
    10 changes: 10 additions & 0 deletions artisan
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    <?php


    // after $kernel = ...
    if(class_exists('Vluzrmos\Tinker\TinkerServiceProvider')) {
    $app->register('Vluzrmos\Tinker\TinkerServiceProvider');
    }
    if ($app->environment() == 'local') {
    $app->register('Wn\Generators\CommandsServiceProvider');
    }
    35 changes: 35 additions & 0 deletions bootstrap - app.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    <?php


    // after $app =

    $app->withFacades();

    $app->withEloquent();

    $app->configure('database');
    $app->configure('auth');
    $app->configure('filesystems');

    // after $app->singleton
    $app->singleton(
    Illuminate\Contracts\Filesystem\Factory::class,
    function ($app) {
    return new Illuminate\Filesystem\FilesystemManager($app);
    }
    );

    $app->routeMiddleware([
    'auth' => App\Http\Middleware\Authenticate::class,
    ]);

    $app->routeMiddleware([
    'cors' => \Barryvdh\Cors\HandleCors::class,
    ]);

    //bla

    $app->register(Tymon\JWTAuth\Providers\LumenServiceProvider::class);
    $app->register(Geocoder\Laravel\Providers\GeocoderService::class);
    $app->register(Barryvdh\Cors\ServiceProvider::class);
    $app->register (Sentry\SentryLaravel\SentryLumenServiceProvider::class);
    21 changes: 21 additions & 0 deletions config - auth.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    <?php
    return [
    'defaults' => [
    'guard' => 'api',
    'passwords' => 'users',
    ],

    'guards' => [
    'api' => [
    'driver' => 'jwt',
    'provider' => 'users',
    ],
    ],

    'providers' => [
    'users' => [
    'driver' => 'eloquent',
    'model' => \App\User::class
    ]
    ]
    ];
    57 changes: 57 additions & 0 deletions config - filesystems.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,57 @@
    <?php
    return [
    /*
    |--------------------------------------------------------------------------
    | Default Filesystem Disk
    |--------------------------------------------------------------------------
    |
    | Here you may specify the default filesystem disk that should be used
    | by the framework. The "local" disk, as well as a variety of cloud
    | based disks are available to your application. Just store away!
    |
    */
    'default' => env('FILESYSTEM_DRIVER', 'local'),
    /*
    |--------------------------------------------------------------------------
    | Default Cloud Filesystem Disk
    |--------------------------------------------------------------------------
    |
    | Many applications store files both locally and in the cloud. For this
    | reason, you may specify a default "cloud" driver here. This driver
    | will be bound as the Cloud disk implementation in the container.
    |
    */
    'cloud' => env('FILESYSTEM_CLOUD', 's3'),
    /*
    |--------------------------------------------------------------------------
    | Filesystem Disks
    |--------------------------------------------------------------------------
    |
    | Here you may configure as many filesystem "disks" as you wish, and you
    | may even configure multiple disks of the same driver. Defaults have
    | been setup for each driver as an example of the required options.
    |
    | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
    |
    */
    'disks' => [
    'local' => [
    'driver' => 'local',
    'root' => storage_path('app'),
    ],
    'public' => [
    'driver' => 'local',
    'root' => storage_path('app/public'),
    'url' => env('APP_URL').'/storage',
    'visibility' => 'public',
    ],
    's3' => [
    'driver' => 's3',
    'key' => env('AWS_ACCESS_KEY_ID'),
    'secret' => env('AWS_SECRET_ACCESS_KEY'),
    'region' => env('AWS_DEFAULT_REGION'),
    'bucket' => env('AWS_BUCKET'),
    'url' => env('AWS_URL'),
    ],
    ],
    ];
    10 changes: 10 additions & 0 deletions lumen.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    # Lumen projectje in elkaar zetten
    lumen new project
    cd project
    composer require barryvdh/laravel-cors
    composer require vluzrmos/tinker
    composer require wn/lumen-generators

    composer require tymon/jwt-auth
    composer require league/flysystem
    cp .env.example .env