- "Codespace asleep"
- Codespaces sleep after 30 minutes of inactivity. Cards that went red because a Codespace was off after the deadline were re-checked by faculty from the repo's last pre-deadline commit.
- "/hello/{name} did not return the name"
- Add
Route::get('/hello/{name}', function (string $name) { return "Hello, {$name}!"; }); in routes/web.php.
- "/about did not return a page with 'About' in a heading"
- Create an
AboutController (php artisan make:controller AboutController) with an index() method that returns view('about'), and a view with <h1>About</h1>. Wire it: Route::get('/about', [AboutController::class, 'index']).
- "POST /students did not redirect"
- After saving in
store(), use return redirect()->route('students.show', $student)->with('status', 'Student added.');
- "/students/999999 returned HTTP 200, not 404"
- Use implicit route model binding:
public function show(Student $student). Laravel will auto-404 on a bad id.
- "/roll/{roll} did not return the student"
- Add explicit binding in
AppServiceProvider::boot(): Route::bind('roll', fn($v) => Student::where('roll_no', $v)->firstOrFail());
- "index.blade.php missing @extends or @section"
- Your
resources/views/students/index.blade.php must start with @extends('layouts.app') and wrap content in @section('content') … @endsection.
- "/api/students did not return a JSON array"
- Add
Route::get('/api/students', function () { return Student::all(); });. Laravel auto-converts Eloquent results to JSON.
- "student.schema.json missing $schema/type/properties/required"
- Create
public/schema/student.schema.json with a valid JSON Schema: {"$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {…}, "required": […]}.
- "Your name and roll number must appear on /students"
- Add yourself to
DatabaseSeeder.php with your real name + roll from the Form, then run php artisan migrate:fresh --seed.
- Are these marks final?
- Yes. The activity closed on Mon 2 Nov, 11:59 PM, and every card has been checked by faculty. Rechecks are switched off.