Skip to content

Commit 0d508e2

Browse files
committed
Use session() helper.
1 parent f782a0d commit 0d508e2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

resources/views/layout/plain.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
<body>
103103

104-
@if($notification = Request::session()->get('notification'))
104+
@if($notification = session()->get('notification'))
105105
{!! view('folio::partial.o-notification', ['notification' => $notification]) !!}
106106
@endif
107107

resources/views/legacy/layout.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
]) !!}
161161
@endif
162162

163-
@if($notification = Request::session()->get('notification'))
163+
@if($notification = session()->get('notification'))
164164
{!! view('folio::partial.o-notification', [
165165
'notification' => $notification,
166166
'classes' => ['o-notification--light'],

src/Controllers/FolioController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public static function showItemBySlug($domain, Request $request, $slug) {
222222
$notification = trans('folio::base.preview-of-unpublished-page');
223223
}
224224

225-
$request->session()->flash('notification', $notification);
225+
session()->flash('notification', $notification);
226226
} else {
227227
// private and hidden (no auth)
228228
return response()->view('errors.404', [], 404);

src/Controllers/LoginController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ public function logout(Request $request)
4444

4545
$this->guard()->logout();
4646

47-
$request->session()->invalidate();
47+
session()->invalidate();
4848

49-
$request->session()->regenerateToken();
49+
session()->regenerateToken();
5050

5151
session(['email' => $email]); // Nono+
5252

0 commit comments

Comments
 (0)