Laravel - Basics and Architecture
You want to create a new Laravel route that returns the current year dynamically. Which code snippet correctly does this in
routes/web.php?routes/web.php?date('Y') function returns the current year as a string.return date('Y'); inside the route's closure sends the year as response.date(d) without quotes, returning the day of the month instead of the year.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions