Skip to content

Commit 4389c7f

Browse files
[11.x] addPath() Allow adding new path for translation loader. (#54277)
* 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]>
1 parent 122e5c2 commit 4389c7f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Illuminate/Translation/FileLoader.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,17 @@ public function namespaces()
182182
return $this->hints;
183183
}
184184

185+
/**
186+
* Add a new path to the loader.
187+
*
188+
* @param string $path
189+
* @return void
190+
*/
191+
public function addPath($path)
192+
{
193+
$this->paths[] = $path;
194+
}
195+
185196
/**
186197
* Add a new JSON path to the loader.
187198
*

0 commit comments

Comments
 (0)