Comments (6)
I actually got it working, for anyone else with this issue please see below. Might you add it to the documentation as well.
In "bootstrap/app.php" Uncomment and add the following:
$app->withFacades(true, ['DarthSoup\Whmcs\Facades\Whmcs' => 'Whmcs']);
$app->register(DarthSoup\Whmcs\WhmcsServiceProvider::class);
To resolve the config_path() error / issue. Create "app/Support/helpers.php" and add the following to that file:
<?php if ( ! function_exists('config_path')) { /** * Get the configuration path. * * @param string $path * @return string */ function config_path($path = '') { return app()->basePath() . '/config' . ($path ? '/' . $path : $path); } }
Modify your composer.json so it looks like this:
"autoload": { "psr-4": { "App\\": "app/" }, "files": [ "app/helpers.php" ] },
Lastly, run composer dump-autoload
- This package should now work.
from laravel-whmcs.
I have personally never used Lumen before, so its good to know that you actually got it working.
So, i may look that i can change the registration behavior for Lumen in the next days.
from laravel-whmcs.
I did a quick test with lumen and changed the boot function to check if its a laravel or lumen instance. Can you check if it now works with my latest change?
from laravel-whmcs.
I just tested with a reinstall and it worked fine.
from laravel-whmcs.
By default, Lumen doesn't have a config/ directory. I didn't notice you changed the readme / directions so I tried it following your directions and it did not work. I still had the config_path() error.
This also won't work with the Facade as they are not enabled by default like Laravel.
from laravel-whmcs.
Well, then i am doing it wrong :D
If you want, you can make a PR. I'm not really experienced with Lumen
from laravel-whmcs.
Related Issues (20)
- get whmcs client details in laravel+adminlte HOT 1
- SSL certificate problem HOT 1
- Doesn't work with Laravel 6.0 HOT 1
- can i get ticket HOT 1
- Unable to install package HOT 2
- Add Guzzle 7 support HOT 2
- Allow WHMCS install on subfolder HOT 2
- An admin user is required HOT 11
- dependency injection of manager class not working HOT 5
- How can I authenticate without config.php HOT 4
- Configurable timeout HOT 4
- How to insert data client Laravel 8 ? HOT 4
- Authentication example HOT 4
- It's not a Problem
- cURL error 60: SSL certificate problem: certificate has expired (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://billing.pakchamp.com/includes/api.php HOT 1
- No support for Laravel 10 HOT 3
- PHP 8.1 support HOT 3
- Illegal string offset 'action' issue HOT 3
- Cart alias conflict HOT 2
- Handle Multiple WHMCS APIs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-whmcs.