Closed lpeterke closed 6 years ago
I had to manually add all the console commands from the package to Console/Kerne.php
If this cannot be fixed withing the package, please expand the docs.
@apocalyarts Can you share how did you do it for a newbie or share the code please? Thanks
Make sure to add the classes to the $commands
array:
// In App\Console\Kernel
protected $commands = [
\Torann\Currency\Console\Update::class,
\Torann\Currency\Console\Cleanup::class,
\Torann\Currency\Console\Manage::class
];
@apocalyarts Tks, worked like a charm
https://github.com/Torann/laravel-currency/blob/master/src/CurrencyServiceProvider.php#L18
remove this condition and all will work fine
@apocalyarts ThankkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkYouuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu 😄 🤣 😆
If you are updating the exchange rate why not just use a cron job? That is how I have my server setup.
In one of my controllers I want to call Artisan::call('currency:update') but it does not work. The Exception:
CommandNotFoundException in Application.php line 490: There are no commands defined in the "currency" namespace.
However, in a different part of my application (a Seeder class), Artisan::call('currency:update') works.
So what is causing the crash in the controller?