generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Middleware Proper Serialization / Unserialization
- Loading branch information
jon
committed
Apr 27, 2022
1 parent
76754df
commit 0e7fe8a
Showing
5 changed files
with
160 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Igerslike\InertiaFlash\Http\Middleware; | ||
|
||
use Illuminate\Http\Request; | ||
use Illuminate\Http\Response; | ||
|
||
class InertiaFlashMiddleware | ||
{ | ||
/** | ||
* Handle the incoming request. | ||
* | ||
* @param Request $request | ||
* @param callable $next | ||
* | ||
* @return Response | ||
*/ | ||
public function handle($request, $next) | ||
{ | ||
inertia_flash()->shareToInertia(); | ||
return $next($request); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters