Update to new Inertia middleware

This commit is contained in:
Jonathan Reinink 2019-04-25 11:18:18 -04:00
parent ad05adf470
commit 0e94b372d1
3 changed files with 18 additions and 39 deletions

View File

@ -19,7 +19,6 @@ class Kernel extends HttpKernel
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
\App\Http\Middleware\ConvertRedirects::class,
];
/**
@ -29,7 +28,7 @@ class Kernel extends HttpKernel
*/
protected $middlewareGroups = [
'web' => [
\Inertia\CheckInertiaVersion::class,
\Inertia\Middleware::class,
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,

View File

@ -1,20 +0,0 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Symfony\Component\HttpFoundation\RedirectResponse;
class ConvertRedirects
{
public function handle($request, Closure $next)
{
$response = $next($request);
if ($response instanceof RedirectResponse) {
$response->setStatusCode(303);
}
return $response;
}
}

34
composer.lock generated
View File

@ -427,12 +427,12 @@
"source": {
"type": "git",
"url": "https://github.com/inertiajs/inertia-laravel.git",
"reference": "d22b42840936f377ba77cef563332f7e544b91ef"
"reference": "db9a7b3f50e22103ec9bae9010dc656ad5272b1a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/inertiajs/inertia-laravel/zipball/d22b42840936f377ba77cef563332f7e544b91ef",
"reference": "d22b42840936f377ba77cef563332f7e544b91ef",
"url": "https://api.github.com/repos/inertiajs/inertia-laravel/zipball/db9a7b3f50e22103ec9bae9010dc656ad5272b1a",
"reference": "db9a7b3f50e22103ec9bae9010dc656ad5272b1a",
"shasum": ""
},
"require-dev": {
@ -442,7 +442,7 @@
"extra": {
"laravel": {
"providers": [
"Inertia\\InertiaServiceProvider"
"Inertia\\ServiceProvider"
]
}
},
@ -467,7 +467,7 @@
"inertia",
"laravel"
],
"time": "2019-04-22T14:39:16+00:00"
"time": "2019-04-25T15:15:34+00:00"
},
{
"name": "jakub-onderka/php-console-color",
@ -559,16 +559,16 @@
},
{
"name": "laravel/framework",
"version": "v5.8.13",
"version": "v5.8.14",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "837e3823e2274d22b8e281d093391b5d9c23029a"
"reference": "d1ba096bf809c7cbe6cb9624222326d75c92fd74"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/837e3823e2274d22b8e281d093391b5d9c23029a",
"reference": "837e3823e2274d22b8e281d093391b5d9c23029a",
"url": "https://api.github.com/repos/laravel/framework/zipball/d1ba096bf809c7cbe6cb9624222326d75c92fd74",
"reference": "d1ba096bf809c7cbe6cb9624222326d75c92fd74",
"shasum": ""
},
"require": {
@ -702,7 +702,7 @@
"framework",
"laravel"
],
"time": "2019-04-18T15:28:45+00:00"
"time": "2019-04-23T13:22:19+00:00"
},
{
"name": "laravel/tinker",
@ -2265,7 +2265,7 @@
},
{
"name": "Gert de Pagter",
"email": "backendtea@gmail.com"
"email": "BackEndTea@gmail.com"
}
],
"description": "Symfony polyfill for ctype functions",
@ -4351,16 +4351,16 @@
},
{
"name": "sebastian/environment",
"version": "4.1.0",
"version": "4.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "6fda8ce1974b62b14935adc02a9ed38252eca656"
"reference": "3095910f0f0fb155ac4021fc51a4a7a39ac04e8a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6fda8ce1974b62b14935adc02a9ed38252eca656",
"reference": "6fda8ce1974b62b14935adc02a9ed38252eca656",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/3095910f0f0fb155ac4021fc51a4a7a39ac04e8a",
"reference": "3095910f0f0fb155ac4021fc51a4a7a39ac04e8a",
"shasum": ""
},
"require": {
@ -4375,7 +4375,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
"dev-master": "4.2-dev"
}
},
"autoload": {
@ -4400,7 +4400,7 @@
"environment",
"hhvm"
],
"time": "2019-02-01T05:27:49+00:00"
"time": "2019-04-25T07:55:20+00:00"
},
{
"name": "sebastian/exporter",