chriskonnertz / translation-factory

Tool for the Laravel framework that helps to create translations
MIT License
38 stars 8 forks source link

php artisan vendor:publish requested even if run #7

Closed ToeiRei closed 6 years ago

ToeiRei commented 6 years ago

I did run

$ php artisan vendor:publish --provider="ChrisKonnertz\TranslationFactory\Integration\TranslationFactoryServiceProvider"
Publishing complete.

But the web interface still shows:

Exception Please publish the assets of the Translation Factory package via: "php artisan vendor:publish --provider="ChrisKonnertz\TranslationFactory\Integration\TranslationFactoryServiceProvider"

Laravel Framework 5.5.32

chriskonnertz commented 6 years ago

Hello,

when you see this exception, Translation Factory fails to access its config file.

Please go to your config directory - usually this is <web-app-dir>/config/. Is there a file with the name translation_factory.php?

I assmue it is missing. This is the code that is responsible for publishing the config file: https://github.com/chriskonnertz/translation-factory/blob/master/src/ChrisKonnertz/TranslationFactory/Integration/TranslationFactoryServiceProvider.php#L23

Do you use XDebug? If so, please add a breakpoint at this line, try to publish it again and tell me if it reaches the breakpoint.

ToeiRei commented 6 years ago

I do not use xdebug;

vagrant@homestead:~/Code/lrm$ ls -als config/
total 107
.....
 8 -rwxrwxrwx 1 vagrant vagrant  4673 Jan 31 17:56 translation_factory.php
....

Content of the file seems to be correct

I did a dd() on $this->config() and it looks like the configuration isn't pulled in:

Repository {#24 ▼
  #items: array:22 [▼
    "activitylog" => array:6 [▶]
    "adminlte" => array:16 [▶]
    "app" => array:14 [▶]
    "auth" => array:4 [▶]
    "broadcasting" => array:2 [▶]
    "cache" => array:3 [▶]
    "database" => array:4 [▶]
    "datatables" => array:8 [▶]
    "filesystems" => array:3 [▶]
    "gravatar" => array:1 [▶]
    "languages" => array:2 [▶]
    "laravel-impersonate" => array:3 [▶]
    "mail" => array:9 [▶]
    "markdown" => array:4 [▶]
    "queue" => array:3 [▶]
    "services" => array:5 [▶]
    "session" => array:15 [▶]
    "trustedproxy" => array:2 [▶]
    "view" => array:2 [▶]
    "laravel-widgets" => array:4 [▶]
    "messenger" => array:7 [▶]
    "langman" => array:1 [▶]
  ]
}
chriskonnertz commented 6 years ago

Workaround: Copy the config file vendor/chriskonnertz/translation-factory/config/config.php ( https://github.com/chriskonnertz/translation-factory/blob/master/config/config.php ) manually to config/translation_facotry.php