Is there a built-in, stable way to detect if a request is being used to fulfill an API or Panel call?
I currently do something like
$path = Url::path();
if (Str::startsWith($path, 'api', true) || Str::startsWith($path, 'panel', true)) {
}
but was wondering if Kirby has a built-in function to determine what kind of request this is.