final class ReaderController
{
public function read(Book $book): Response
{
Auth::requireUser();
Session::put('chapter', $book->currentChapter());
return view('reader/show', compact('book'));
}
}The Last Lighthouse
A book presentation with sign-in, a protected reader, and session-based reading progress.
What this demo validates
MVC routing, controllers, models, PHP views, sessions, validation, CSRF, redirects, and responsive UI.
Stack
01PHPAML MVC02PHP Views03Sessions04CSRF05Automated tests