has('logged_in') || !session('logged_in')) { return redirect('/')->with('error', 'Silahkan login terlebih dahulu!'); } return $next($request); } }