Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

Commit 6ffac02

Browse files
authored
Merge pull request #63 from lextira/update-laravel-7.x
Update to Laravel 7.x
2 parents 6658e87 + bd0a455 commit 6ffac02

29 files changed

+162
-431
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ REDIS_HOST=127.0.0.1
2222
REDIS_PASSWORD=null
2323
REDIS_PORT=6379
2424

25-
MAIL_DRIVER=smtp
25+
MAIL_MAILER=smtp
2626
MAIL_HOST=mailtrap.io
2727
MAIL_PORT=2525
2828
MAIL_USERNAME=null

app/Console/Kernel.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ class Kernel extends ConsoleKernel
2424
*/
2525
protected function schedule(Schedule $schedule)
2626
{
27-
// $schedule->command('inspire')
28-
// ->hourly();
27+
// $schedule->command('inspire')->hourly();
2928
}
3029

3130
/**

app/Exceptions/Handler.php

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

33
namespace Framework\Exceptions;
44

5-
use Exception;
6-
use Illuminate\Auth\AuthenticationException;
75
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
6+
use Throwable;
87

98
class Handler extends ExceptionHandler
109
{
@@ -14,23 +13,17 @@ class Handler extends ExceptionHandler
1413
* @var array
1514
*/
1615
protected $dontReport = [
17-
\Illuminate\Auth\AuthenticationException::class,
18-
\Illuminate\Auth\Access\AuthorizationException::class,
19-
\Symfony\Component\HttpKernel\Exception\HttpException::class,
20-
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
21-
\Illuminate\Session\TokenMismatchException::class,
22-
\Illuminate\Validation\ValidationException::class,
2316
];
2417

2518
/**
2619
* Report or log an exception.
2720
*
28-
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
29-
*
30-
* @param \Exception $exception
21+
* @param \Throwable $exception
3122
* @return void
23+
*
24+
* @throws \Exception
3225
*/
33-
public function report(Exception $exception)
26+
public function report(Throwable $exception)
3427
{
3528
parent::report($exception);
3629
}
@@ -39,27 +32,13 @@ public function report(Exception $exception)
3932
* Render an exception into an HTTP response.
4033
*
4134
* @param \Illuminate\Http\Request $request
42-
* @param \Exception $exception
43-
* @return \Illuminate\Http\Response
44-
*/
45-
public function render($request, Exception $exception)
46-
{
47-
return parent::render($request, $exception);
48-
}
49-
50-
/**
51-
* Convert an authentication exception into an unauthenticated response.
35+
* @param \Throwable $exception
36+
* @return \Symfony\Component\HttpFoundation\Response
5237
*
53-
* @param \Illuminate\Http\Request $request
54-
* @param \Illuminate\Auth\AuthenticationException $exception
55-
* @return \Illuminate\Http\Response
38+
* @throws \Throwable
5639
*/
57-
protected function unauthenticated($request, AuthenticationException $exception)
40+
public function render($request, Throwable $exception)
5841
{
59-
if ($request->expectsJson()) {
60-
return response()->json(['error' => 'Unauthenticated.'], 401);
61-
}
62-
63-
return redirect()->guest('login');
42+
return parent::render($request, $exception);
6443
}
6544
}

app/Http/Controllers/Auth/ForgotPasswordController.php

Lines changed: 0 additions & 32 deletions
This file was deleted.

app/Http/Controllers/Auth/LoginController.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

app/Http/Controllers/Auth/RegisterController.php

Lines changed: 0 additions & 72 deletions
This file was deleted.

app/Http/Controllers/Auth/ResetPasswordController.php

Lines changed: 0 additions & 32 deletions
This file was deleted.

app/Http/Controllers/Auth/VerificationController.php

Lines changed: 0 additions & 41 deletions
This file was deleted.

app/Http/Kernel.php

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Kernel extends HttpKernel
1515
*/
1616
protected $middleware = [
1717
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
18+
\Fruitcake\Cors\HandleCors::class,
1819
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
1920
\Framework\Http\Middleware\TrimStrings::class,
2021
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
@@ -60,21 +61,4 @@ class Kernel extends HttpKernel
6061
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
6162
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
6263
];
63-
64-
/**
65-
* The priority-sorted list of middleware.
66-
*
67-
* This forces the listed middleware to always be in the given order.
68-
*
69-
* @var array
70-
*/
71-
protected $middlewarePriority = [
72-
\Illuminate\Session\Middleware\StartSession::class,
73-
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
74-
\Framework\Http\Middleware\Authenticate::class,
75-
\Illuminate\Routing\Middleware\ThrottleRequests::class,
76-
\Illuminate\Session\Middleware\AuthenticateSession::class,
77-
\Illuminate\Routing\Middleware\SubstituteBindings::class,
78-
\Illuminate\Auth\Middleware\Authorize::class,
79-
];
8064
}

app/Http/Middleware/VerifyCsrfToken.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66

77
class VerifyCsrfToken extends BaseVerifier
88
{
9-
/**
10-
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
11-
*
12-
* @var bool
13-
*/
14-
protected $addHttpCookie = true;
15-
169
/**
1710
* The URIs that should be excluded from CSRF verification.
1811
*

0 commit comments

Comments
 (0)