Skip to content

Commit 6143186

Browse files
authored
[11.x] Add prependLocation method to View Factory (#52806)
1 parent 6dd3a51 commit 6143186

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Illuminate/Support/Facades/View.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* @method static bool hasRenderedOnce(string $id)
1919
* @method static void markAsRenderedOnce(string $id)
2020
* @method static void addLocation(string $location)
21+
* @method static void prependLocation(string $location)
2122
* @method static \Illuminate\View\Factory addNamespace(string $namespace, string|array $hints)
2223
* @method static \Illuminate\View\Factory prependNamespace(string $namespace, string|array $hints)
2324
* @method static \Illuminate\View\Factory replaceNamespace(string $namespace, string|array $hints)

src/Illuminate/View/Factory.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,17 @@ public function addLocation($location)
424424
$this->finder->addLocation($location);
425425
}
426426

427+
/**
428+
* Prepend a location to the array of view locations.
429+
*
430+
* @param string $location
431+
* @return void
432+
*/
433+
public function prependLocation($location)
434+
{
435+
$this->finder->prependLocation($location);
436+
}
437+
427438
/**
428439
* Add a new namespace to the loader.
429440
*

0 commit comments

Comments
 (0)