Download the PHP package sburina/laravel-whmcs-up without Composer

On this page you can find all versions of the php package sburina/laravel-whmcs-up. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-whmcs-up

Laravel WHMCS-UP

Latest Stable Version Total Downloads License

This package provides several useful functions for integration of your Laravel application with WHMCS (up to version 7.9):

Installation

Install the package through Composer.

After Laravel 5.5

No additional steps required.

Before Laravel 5.5

Now you can use the package in your Laravel project.

Usage

This package defines several important WHMCS methods with custom signature, providing somewhat easier use and code completion. These methods are:

All other WHMCS API methods can be used magically by calling the \Whmcs::{WHMCS_API_METHOD} facade. This also works with all the custom API functions stored in your WHMCS API folder. For complete specification of WHMCS API methods please take a look at the WHMCS API Index.

Examples

Get user's detail using our method:

The same thing, using the original WHMCS API method via a magic call:

Obtain a list of client purchased products

Retrieve a specific invoice

If you for any reason don't like facades, you can use the app() helper.

Authenticating against WHMCS user base

If your Laravel application doesn't have its own user base, but you still need to authenticate users before allowing them to access certain pages (NOT WHMCS pages), there are few additional steps to take:

Now you can simply use the existing Laravel Auth::routes() with already provided auth pages, exactly the same way as if you had a local user base.

On successful login, the session_key named in config/whmcs.php (default: user) will be populated with user data retrieved from WHMCS, and the login session will start as usual. auth()->check() and auth()->guest() will work, and auth()->user() will return the instance of WhmcsUser class with attributes populated with user's data. User's data won't be retrieved from WHMCS again while the login session is in progress and the session key user exists.

On logout, the session key user will be destroyed and the login session will end.

Remote login / redirect

User that logged in into your Laravel application this way will not be automatically logged in to WHMCS! To redirect the authenticated user to any protected WHMCS page and log them into WHMCS automatically at the same time, you can use:

config/whmcs.php option autoauth.goto determines the default URI for such redirects. You can override the default by adding the argument to this method:

If you'd prefer just getting the login URL and sending it to the user from your own code, you can do it like so:

Again, you can override the default URI:

To learn more about this feature and how to enable it in WHMCS, see WHMCS AutoAuth.

Support

Please open an issue in github

License

This package is released under the MIT License. See the bundled LICENSE file for details.


All versions of laravel-whmcs-up with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
laravel/framework Version ^5 || ^6 || ^7 || ^8 || ^9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sburina/laravel-whmcs-up contains the following files

Loading the files please wait ....