Skip to content

Commit 5b3aa9b

Browse files
committed
Bumping to laravel 8.4, laravel-base-dev ^0.5.0
1 parent 63a4774 commit 5b3aa9b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+360
-303
lines changed

.env.example

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ APP_LOG=single
66
APP_STORAGE=storage
77

88
LOG_CHANNEL=stack
9+
LOG_LEVEL=debug
910

1011
DB_CONNECTION=mysql
1112
DB_HOST=db
@@ -16,10 +17,13 @@ DB_PASSWORD=dev
1617

1718
BROADCAST_DRIVER=log
1819
CACHE_DRIVER=file
20+
FILESYSTEM_DRIVER=local
1921
QUEUE_CONNECTION=sync
2022
SESSION_DRIVER=redis
2123
SESSION_LIFETIME=120
2224

25+
MEMCACHED_HOST=127.0.0.1
26+
2327
REDIS_HOST=redis
2428
REDIS_PASSWORD=null
2529
REDIS_PORT=6379
@@ -32,3 +36,12 @@ MAIL_PASSWORD=null
3236
MAIL_ENCRYPTION=null
3337
MAIL_FROM_ADDRESS="info@${APP_DOMAIN}"
3438
MAIL_FROM_NAME="${APP_NAME}"
39+
40+
AWS_ACCESS_KEY_ID=
41+
AWS_SECRET_ACCESS_KEY=
42+
AWS_DEFAULT_REGION=us-east-1
43+
AWS_BUCKET=
44+
AWS_USE_PATH_STYLE_ENDPOINT=false
45+
46+
PUSHER_APP_ID=
47+
PUSHER_APP_KEY=

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
.env
77
.env.backup
88
.phpunit.result.cache
9+
docker-compose.override.yml
910
Homestead.json
1011
Homestead.yaml
1112
npm-debug.log
1213
yarn-error.log
14+
/.idea
15+
/.vscode
1316
.DS_Store
1417
/coverage
1518
/.vagrant

.styleci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
php:
22
preset: laravel
33
disabled:
4-
- unused_use
4+
- no_unused_imports
55
finder:
66
not-name:
77
- index.php

app/App/Exceptions/Handler.php

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,20 @@ class Handler extends ExceptionHandler
2222
* @var array
2323
*/
2424
protected $dontFlash = [
25+
'current_password',
2526
'password',
2627
'password_confirmation',
2728
];
2829

2930
/**
30-
* Report or log an exception.
31+
* Register the exception handling callbacks for the application.
3132
*
32-
* @param \Throwable $exception
3333
* @return void
34-
*
35-
* @throws \Exception
36-
*/
37-
public function report(Throwable $exception)
38-
{
39-
parent::report($exception);
40-
}
41-
42-
/**
43-
* Render an exception into an HTTP response.
44-
*
45-
* @param \Illuminate\Http\Request $request
46-
* @param \Throwable $exception
47-
* @return \Symfony\Component\HttpFoundation\Response
48-
*
49-
* @throws \Throwable
5034
*/
51-
public function render($request, Throwable $exception)
35+
public function register()
5236
{
53-
return parent::render($request, $exception);
37+
$this->reportable(function (Throwable $e) {
38+
//
39+
});
5440
}
5541
}

app/App/Http/Kernel.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Kernel extends HttpKernel
1616
protected $middleware = [
1717
\App\Http\Middleware\TrustProxies::class,
1818
\Fruitcake\Cors\HandleCors::class,
19-
\App\Http\Middleware\CheckForMaintenanceMode::class,
19+
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
2020
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
2121
\App\Http\Middleware\TrimStrings::class,
2222
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
@@ -39,7 +39,7 @@ class Kernel extends HttpKernel
3939
],
4040

4141
'api' => [
42-
'throttle:60,1',
42+
'throttle:api',
4343
\Illuminate\Routing\Middleware\SubstituteBindings::class,
4444
],
4545
];
@@ -54,7 +54,6 @@ class Kernel extends HttpKernel
5454
protected $routeMiddleware = [
5555
'auth' => \App\Http\Middleware\Authenticate::class,
5656
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
57-
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
5857
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
5958
'can' => \Illuminate\Auth\Middleware\Authorize::class,
6059
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,

app/App/Http/Middleware/CheckForMaintenanceMode.php renamed to app/App/Http/Middleware/PreventRequestsDuringMaintenance.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace App\Http\Middleware;
44

5-
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
5+
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
66

7-
class CheckForMaintenanceMode extends Middleware
7+
class PreventRequestsDuringMaintenance extends Middleware
88
{
99
/**
1010
* The URIs that should be reachable while maintenance mode is enabled.

app/App/Http/Middleware/RedirectIfAuthenticated.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Providers\RouteServiceProvider;
66
use Closure;
7+
use Illuminate\Http\Request;
78
use Illuminate\Support\Facades\Auth;
89

910
class RedirectIfAuthenticated
@@ -13,13 +14,17 @@ class RedirectIfAuthenticated
1314
*
1415
* @param \Illuminate\Http\Request $request
1516
* @param \Closure $next
16-
* @param string|null $guard
17+
* @param string|null ...$guards
1718
* @return mixed
1819
*/
19-
public function handle($request, Closure $next, $guard = null)
20+
public function handle(Request $request, Closure $next, ...$guards)
2021
{
21-
if (Auth::guard($guard)->check()) {
22-
return redirect(RouteServiceProvider::HOME);
22+
$guards = empty($guards) ? [null] : $guards;
23+
24+
foreach ($guards as $guard) {
25+
if (Auth::guard($guard)->check()) {
26+
return redirect(RouteServiceProvider::HOME);
27+
}
2328
}
2429

2530
return $next($request);

app/App/Http/Middleware/TrimStrings.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class TrimStrings extends Middleware
1212
* @var array
1313
*/
1414
protected $except = [
15+
'current_password',
1516
'password',
1617
'password_confirmation',
1718
];

app/App/Http/Middleware/TrustProxies.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ class TrustProxies extends Middleware
1919
*
2020
* @var int
2121
*/
22-
protected $headers = Request::HEADER_X_FORWARDED_ALL;
22+
protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
2323
}

app/App/User.php renamed to app/App/Models/User.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
<?php
22

3-
namespace App;
3+
namespace App\Models;
44

55
use Illuminate\Contracts\Auth\MustVerifyEmail;
6+
use Illuminate\Database\Eloquent\Factories\HasFactory;
67
use Illuminate\Foundation\Auth\User as Authenticatable;
78
use Illuminate\Notifications\Notifiable;
89

910
class User extends Authenticatable
1011
{
11-
use Notifiable;
12+
use HasFactory, Notifiable;
1213

1314
/**
1415
* The attributes that are mass assignable.
1516
*
1617
* @var array
1718
*/
1819
protected $fillable = [
19-
'name', 'email', 'password',
20+
'name',
21+
'email',
22+
'password',
2023
];
2124

2225
/**
@@ -25,7 +28,8 @@ class User extends Authenticatable
2528
* @var array
2629
*/
2730
protected $hidden = [
28-
'password', 'remember_token',
31+
'password',
32+
'remember_token',
2933
];
3034

3135
/**

0 commit comments

Comments
 (0)