From f5839fd1b739deee2d16f317a22938529b9775e8 Mon Sep 17 00:00:00 2001 From: nshiro <14008307+nshiro@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:59:29 +0900 Subject: [PATCH] [11.x] Add prependLocation method to View Factory --- src/Illuminate/Support/Facades/View.php | 1 + src/Illuminate/View/Factory.php | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/Illuminate/Support/Facades/View.php b/src/Illuminate/Support/Facades/View.php index 10eaa645d548..90eb67bb66b9 100755 --- a/src/Illuminate/Support/Facades/View.php +++ b/src/Illuminate/Support/Facades/View.php @@ -18,6 +18,7 @@ * @method static bool hasRenderedOnce(string $id) * @method static void markAsRenderedOnce(string $id) * @method static void addLocation(string $location) + * @method static void prependLocation(string $location) * @method static \Illuminate\View\Factory addNamespace(string $namespace, string|array $hints) * @method static \Illuminate\View\Factory prependNamespace(string $namespace, string|array $hints) * @method static \Illuminate\View\Factory replaceNamespace(string $namespace, string|array $hints) diff --git a/src/Illuminate/View/Factory.php b/src/Illuminate/View/Factory.php index bc6e59d55afd..e5efe067e86e 100755 --- a/src/Illuminate/View/Factory.php +++ b/src/Illuminate/View/Factory.php @@ -424,6 +424,17 @@ public function addLocation($location) $this->finder->addLocation($location); } + /** + * Prepend a location to the array of view locations. + * + * @param string $location + * @return void + */ + public function prependLocation($location) + { + $this->finder->prependLocation($location); + } + /** * Add a new namespace to the loader. *