From 9d2a95c6278c17fc6ef557061bde23e0489c327e Mon Sep 17 00:00:00 2001 From: Nico Deblauwe Date: Mon, 23 Dec 2024 20:09:44 +0100 Subject: [PATCH] BUGFIX :bug: Deal correclty with directory separator --- src/Http/Controllers/AdminController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/AdminController.php b/src/Http/Controllers/AdminController.php index ab0f63f..15e9965 100644 --- a/src/Http/Controllers/AdminController.php +++ b/src/Http/Controllers/AdminController.php @@ -205,7 +205,7 @@ private function policyCheck(string $ability, ?Model $model = null): void // If the policy doesn't exist, we can't check it (but issue warning) $class = $this->config->CLASS; - $policy = 'app\\Policies\\'.class_basename($class).'Policy.php'; + $policy = 'app'.DIRECTORY_SEPARATOR.'Policies'.DIRECTORY_SEPARATOR.class_basename($class).'Policy.php'; if (!file_exists(base_path($policy))) { Log::warning('Policies enabled, but no '.$policy.' found for '.$class.'.');