Skip to content Skip to footer navigation

Session-forget Tag

Remove variables from the user session by passing the names of the variables into the keys parameter.

Example

Pass multiple keys by delimiting them with a pipe.

{{ session:forget keys="likes|referral" }}
{{-- Using Antlers Blade Components --}}
<s:session:forget keys="likes|referral" />
 
{{-- Using the session() helper --}}
@php(session()->forget(['likes', 'referral']))
Hot Tip!

The entire session can be wiped with the session:flush tag. Always wipe and flush, folks.

This is the humor you came for and the software you (maybe) paid for.

A troll pointing a teaching stick