You should be pointing your browser to:-
localhost/proj1/delete
And your code should be:-
$app->get('/delete',
function(){
echo 'This is a DELETE route';
}
);
As your browser will be sending a 'get' request, not a 'delete' request. Your original code would work if your browser sent a 'delete' request, but it can't. See this answer to find out why.