Skip to content

Commit

Permalink
Fix share inertia data (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbutcher committed Feb 15, 2023
1 parent 0330583 commit 6d072c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Middleware/ShareInertiaData.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace JoelButcher\Socialstream\Http\Middleware;

use Closure;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
Expand All @@ -15,7 +16,7 @@ class ShareInertiaData
/**
* Handle the incoming request.
*/
public function handle(Request $request, Closure $next): Response|RedirectResponse
public function handle(Request $request, Closure $next): Response|RedirectResponse|JsonResponse
{
Inertia::share(array_filter([
'socialstream' => function () use ($request) {
Expand Down

0 comments on commit 6d072c1

Please sign in to comment.