Debug Info";
echo "
";
echo "- APP_ENV: " . app()->environment() . "
";
echo "- APP_URL: " . config('app.url') . "
";
echo "- SECURE: " . (request()->isSecure() ? 'Yes' : 'No') . "
";
echo "- URL helper test: " . url('/test-path') . "
";
echo "
";
echo "Helper Tests
";
try {
if (auth()->check()) {
echo "- Testing for User ID: " . auth()->id() . "
";
$start = microtime(true);
$companyId = getCompanyId(auth()->id());
$end = microtime(true);
echo "- getCompanyId result: " . ($companyId ?? 'null') . " (Time: " . round($end - $start, 4) . "s)
";
$start = microtime(true);
$ids = getCompanyAndUsersId();
$end = microtime(true);
echo "- getCompanyAndUsersId count: " . count($ids) . " (Time: " . round($end - $start, 4) . "s)
";
} else {
echo "- User not authenticated. Login first to test helpers.
";
}
} catch (Exception $e) {
echo "- ❌ Error: " . $e->getMessage() . "
";
}
echo "
";
echo "Headers
";
print_r(request()->headers->all());
echo "
";