This should get you started.
example.com {
root ./public
log ./storage/logs/caddy-access.log
errors ./storage/logs/caddy-error.log
fastcgi / 127.0.0.1:9000 php {
index index.php
}
rewrite {
r .*
ext /
to /index.php?{query}
}
}