This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I'm working on a plugin and will use Omnipay. I've done a research and found some packages that integrates the Omnipay library with Laravel as ignited/omnipay and barryvdh/laravel-omnipay. I've tried both of them by following this steps (all on the plugin directory):
-
Create a
composer.json
file and add this:{ "name": "BalanceRecharge Plugin", "email": "webmaster@root.com", "require": { #in this case I'm using barryvdh/laravel-omnipay "barryvdh/laravel-omnipay": "0.1.*", "omnipay/omnipay": "*" } }
- Run
composer update
for update library and dependencies, all good -
Add
'Barryvdh\Omnipay\ServiceProvider'
to the providers:'providers' => array_merge(include(base_path().'/modules/system/providers.php'), array( // 'Illuminate\Html\HtmlServiceProvider', // Example 'System\ServiceProvider', 'Barryvdh\Omnipay\ServiceProvider', )),
- Then try to run the command
php artisan config:publish barryvdh/laravel-omnipay
but get the error below:
PHP Fatal error: Class 'Barryvdh\Omnipay\ServiceProvider' not found in /var/www/html/alomicuba/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157 PHP Stack trace: PHP 1. {main}() /var/www/html/alomicuba/artisan:0 PHP 2. require_once() /var/www/html/alomicuba/artisan:30 PHP 3. require() /var/www/html/alomicuba/bootstrap/start.php:57 PHP 4. Illuminate\Foundation\ProviderRepository->load() /var/www/html/alomicuba/vendor/laravel/framework/src/Illuminate/Foundation/start.php:210 PHP 5. Illuminate\Foundation\ProviderRepository->compileManifest() /var/www/html/alomicuba/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:57 PHP 6. Illuminate\Foundation\ProviderRepository->createProvider() /var/www/html/alomicuba/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:121
What I'm doing wrong? What is the right way to register the Provider?
Did you ever get this working @reynierpm ? I'd be grateful if you could please share your code with the community.
@forums7529: see https://luketowers.ca/blog/how-to-use-laravel-packages-in-october-cms-plugins/ for an article I wrote on how to use Laravel Packages in October plugins
1-4 of 4