Giter VIP home page Giter VIP logo

Comments (6)

PV-Patrick avatar PV-Patrick commented on June 2, 2024

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.

darthsoup avatar darthsoup commented on June 2, 2024

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.

darthsoup avatar darthsoup commented on June 2, 2024

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.

PV-Patrick avatar PV-Patrick commented on June 2, 2024

I just tested with a reinstall and it worked fine.

from laravel-whmcs.

PV-Patrick avatar PV-Patrick commented on June 2, 2024

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.

darthsoup avatar darthsoup commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.