Bird
0
0

You wrote this route in routes/web.php:

medium📝 Debug Q6 of 15
Laravel - Basics and Architecture
You wrote this route in routes/web.php:
Route::get('/home', function () {
    return view('home');
});

But visiting /home gives a 404 error. What is the likely cause?
AThe web server is not running
BThe view file <code>home.blade.php</code> does not exist
CThe route file is named incorrectly
DThe route method should be post, not get
Step-by-Step Solution
Solution:
  1. Step 1: Check route and view correctness

    The route is correctly defined for GET /home and returns view 'home'. Missing view causes a different error, not 404.
  2. Step 2: Consider server status

    If the web server is not running, no routes respond, causing 404 errors.
  3. Final Answer:

    The web server is not running -> Option A
  4. Quick Check:

    404 on valid route = server down [OK]
Quick Trick: Check if server is running when routes give 404 [OK]
Common Mistakes:
  • Assuming missing view causes 404
  • Changing route method unnecessarily
  • Renaming route file without cause

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes