Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Add prependLocation method to View Factory #52806

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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