Skip to content

Commit

Permalink
Merge pull request #27 from specialtactics/v1.1
Browse files Browse the repository at this point in the history
Laravel 6 update
  • Loading branch information
specialtactics authored Oct 13, 2019
2 parents 2d303b3 + b707922 commit c1465f1
Show file tree
Hide file tree
Showing 46 changed files with 196 additions and 211 deletions.
15 changes: 11 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{json,yml}]
[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.{js,json}]
indent_style = space
indent_size = 2
9 changes: 7 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DB_PASSWORD=secret

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_DRIVER=redis
QUEUE_CONNECTION=redis

REDIS_HOST=your_project_redis
REDIS_PASSWORD=null
Expand All @@ -40,6 +40,11 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
Expand Down Expand Up @@ -69,7 +74,7 @@ DATA_PATH_HOST=./storage/laradock/

### PHP ###########################################

# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.2 - 7.1 - 7.0 - 5.6 - 5.5
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.2, 7.3
PHP_VERSION=7.3

# Enable Xdebug
Expand Down
16 changes: 7 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
/public/storage
/storage/*.key
/vendor
/.idea
/.vscode
/.vagrant
.env
.env.backup
.phpunit.result.cache

Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log

.env
composer.lock

/.idea
/.vscode
/.vagrant
.phpstorm*
_ide_helper.php

# mac os
.DS_Store
.DS_Store
12 changes: 6 additions & 6 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
preset: laravel

enabled:

- alpha_ordered_imports
disabled:
- length_ordered_imports
- no_unused_imports
- phpdoc_summary
- phpdoc_var_without_name
- unused_use
- post_increment

- phpdoc_summary
finder:
not-name:
- index.php
- server.php
exclude:
- "tests"
- "storage"
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Auth/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace App\Http\Controllers\Auth;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\User;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
use Illuminate\Http\Request;
use Specialtactics\L5Api\Http\Controllers\Features\JWTAuthenticationTrait;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;

class AuthController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Specialtactics\L5Api\Http\Controllers\RestfulController as BaseController;

class Controller extends BaseController
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/RoleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\Role;
use Illuminate\Http\Request;

class RoleController extends Controller
{
Expand Down
4 changes: 3 additions & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
\App\Http\Middleware\TrustProxies::class,
\App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
];

/**
Expand Down Expand Up @@ -58,6 +58,7 @@ class Kernel extends HttpKernel
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
Expand All @@ -76,6 +77,7 @@ class Kernel extends HttpKernel
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\Authenticate::class,
\Illuminate\Routing\Middleware\ThrottleRequests::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Illuminate\Auth\Middleware\Authorize::class,
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace App\Http\Middleware;

use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Request;

class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array
* @var array|string
*/
protected $proxies;

Expand Down
12 changes: 6 additions & 6 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

namespace App\Models;

use Illuminate\Notifications\Notifiable;
use App\Models\Role;
use Hash;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Notifications\Notifiable;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Hash;
use App\Models\Role;

class User extends BaseModel implements
AuthenticatableContract,
Expand Down Expand Up @@ -46,7 +46,7 @@ class User extends BaseModel implements
* @var array
*/
protected $hidden = [
'password', 'remember_token', 'primary_role',
'password', 'remember_token', 'email_verified_at', 'primary_role',
];

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use App\Exceptions\ApiExceptionHandler;
use Config;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Providers;

use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;

class AuthServiceProvider extends ServiceProvider
{
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/BroadcastServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;

class BroadcastServiceProvider extends ServiceProvider
{
Expand Down
6 changes: 2 additions & 4 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Providers;

use Illuminate\Support\Facades\Event;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;

class EventServiceProvider extends ServiceProvider
{
Expand All @@ -13,9 +13,7 @@ class EventServiceProvider extends ServiceProvider
* @var array
*/
protected $listen = [
'App\Events\Event' => [
'App\Listeners\EventListener',
],

];

/**
Expand Down
4 changes: 1 addition & 3 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Providers;

use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Route;

class RouteServiceProvider extends ServiceProvider
{
Expand Down Expand Up @@ -39,8 +39,6 @@ public function map()
$this->mapApiRoutes();

//$this->mapWebRoutes();

//
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/TelescopeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace App\Providers;

use Laravel\Telescope\Telescope;
use Illuminate\Support\Facades\Gate;
use Laravel\Telescope\IncomingEntry;
use Laravel\Telescope\Telescope;
use Laravel\Telescope\TelescopeApplicationServiceProvider;

class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
Expand Down
17 changes: 8 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "specialtactics/l5-api-boilerplate",
"description": "An API boilerplate for Laravel 5",
"name": "specialtactics/laravel-api-boilerplate",
"description": "An API boilerplate for Laravel",
"keywords": ["laravel", "boilerplate", "api", "api boilerplate", "laravel api"],
"license": "MIT",
"type": "project",
Expand All @@ -11,22 +11,21 @@
}
],
"require": {
"php": "^7.1.3",
"php": "^7.2",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.8.*",
"laravel/framework": "^6",
"laravel/tinker": "^1.0",
"specialtactics/l5-api": "~1",
"predis/predis": "^1.1"
"specialtactics/l5-api": "^1.1"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.4",
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"facade/ignition": "^1.4",
"fzaninotto/faker": "^1.4",
"laravel/telescope": "~2.0",
"laravel/telescope": "^2",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.5"
"phpunit/phpunit": "^8.3"
},
"config": {
"optimize-autoloader": true,
Expand Down
14 changes: 14 additions & 0 deletions config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
'api' => [
'driver' => 'jwt',
'provider' => 'users',
'hash' => false,
],
],

Expand Down Expand Up @@ -99,4 +100,17 @@
],
],

/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/

'password_timeout' => 10800,

];
2 changes: 1 addition & 1 deletion config/broadcasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
'useTLS' => true,
],
],

Expand Down
1 change: 1 addition & 0 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],

],
Expand Down
Loading

0 comments on commit c1465f1

Please sign in to comment.