Skip to content

Commit

Permalink
[4.x] Use base Symfony response class as return type for `ShareInerti…
Browse files Browse the repository at this point in the history
…aData` (#263)
  • Loading branch information
sanis authored Mar 8, 2023
1 parent ebd637d commit ccdca7b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Http/Middleware/ShareInertiaData.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
namespace JoelButcher\Socialstream\Http\Middleware;

use Closure;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Inertia\Inertia;
use JoelButcher\Socialstream\ConnectedAccount;
use JoelButcher\Socialstream\Socialstream;
use Symfony\Component\HttpFoundation\Response;

class ShareInertiaData
{
/**
* Handle the incoming request.
*/
public function handle(Request $request, Closure $next): Response|RedirectResponse|JsonResponse
public function handle(Request $request, Closure $next): Response
{
Inertia::share(array_filter([
'socialstream' => function () use ($request) {
Expand Down

0 comments on commit ccdca7b

Please sign in to comment.