1

Whenever I create a module via the php artisan command: php artisan module:make [Name] , the trans() function that was functioning before breaks I have already searched where the break happens but I can't find it also can't find what is exactly changed after this php artisan command.

Even turning off the module via the artisan command won't fix trans() helper.

*Edit:

Okay this module Translator is overwriting the base app translator ($this->translator = $app['translator']; inside /Vendor/nWidart/Module.php), which shouldn't happen. How could I prevent this from happening? Because setting translations config settings to false won't do anything. I also tried setting the singleton translator again, but the Translator class can't be found or when I use the illuminate translator some function when configuring the new created translator.

Iets Iets
  • 47
  • 6
  • 1
    Take 1 step back. Your `trans()` function breaks, but now you need to create a reproducible example: https://stackoverflow.com/help/minimal-reproducible-example. If you want older version of the package, just put it at an older version and `composer update`. It depends on your Laravel version of it can handle that – UnderDog Jun 30 '23 at 14:00

0 Answers0