Laravel Call to a member function setCookie() on null - when returning controller action from middleware
问题 Hello Good Developers, This is Not a Direct Duplicate of: Call to a member function setCookie() on null As I am calling a Controller action from Middleware and then in the controller action I am returning View, Here's My Route from web.php Route::get('/end', [EndPageController::class, 'index']) ->name('survey.end') ->middleware('App\Http\Middleware\LegacyEndCheck'); Middleware LegacyEndCheck.php handle function public function handle($request, Closure $next) { $sjid = $request->input('sjid',