Skip to content

Commit

Permalink
[11.x] addPath() Allow adding new path for translation loader. (#54277
Browse files Browse the repository at this point in the history
)

* It allows adding new directories with the `addLocation` method.

* Update FileLoader.php

* Update FileLoader.php

* Update FileLoader.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
selcukcukur and taylorotwell authored Jan 20, 2025
1 parent 122e5c2 commit 4389c7f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Illuminate/Translation/FileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,17 @@ public function namespaces()
return $this->hints;
}

/**
* Add a new path to the loader.
*
* @param string $path
* @return void
*/
public function addPath($path)
{
$this->paths[] = $path;
}

/**
* Add a new JSON path to the loader.
*
Expand Down

0 comments on commit 4389c7f

Please sign in to comment.