<?php
$config = require('config.php');
$db = new Database($config['database']);
$heading = 'Note';
$currentUserId = 1;
$note = $db->query('select * from notes where id = :id',[
'id' => $_GET['id']
])->findOrFail();
authorize($note['user_id'] === $currentUserId);
require "views/note.view.php";
i get this error: Warning: Undefined array key "id" in C:\laragon\www\controllers\note.php on line 15
as an example this is working well
<?php
$config = require('config.php');
$db = new Database($config['database']);
$heading = 'My Notes';
$notes = $db->query('select * from notes where user_id = 1')->get();
require "views/notes.view.php";
'id' => $_GET['id']
I tried to debugging this part with every method I can think of. Why is the "id" showing as an undefined array?