SafeDemoController.php
Safe Session Demonstration Controller
Example controller showing practical usage of the Safe session system. Demonstrates setting sample data and displaying Safe contents in a web application context.
ROUTES TO ADD:
// Add these routes to your router configuration: Router::get('/safe/demo/setup', [], function () {(new SafeDemoController())->setupSession();}); Router::get('/safe/demo/display', [], function () {(new SafeDemoController())->displaySession();}); Router::get('/safe/demo', [], function () {(new SafeDemoController())->index();});
USAGE:
- Visit /safe/demo/setup to populate session with demo data
- Visit /safe/demo/display to view all session contents
- Visit /safe/demo for overview and navigation links