Skip to content

Commit

Permalink
[11.x] Add prependLocation method to View Factory (#52806)
Browse files Browse the repository at this point in the history
  • Loading branch information
nshiro authored Sep 16, 2024
1 parent 6dd3a51 commit 6143186
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Illuminate/Support/Facades/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions src/Illuminate/View/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 6143186

Please sign in to comment.