spits-online/laravel-wefact-api

A Laravel wrapper for the HostFact / WeFact API

1.0.0 2025-05-23 07:50 UTC

This package is not auto-updated.

Last update: 2025-05-23 14:23:39 UTC


README

Installation

composer require spits-online/laravel-wefact-api
php artisan vendor:publish --provider="Spits\WeFactApi\WeFactApiServiceProvider"

Configuration

Set the .ENV variables

WEFACT_API_KEY=
WEFACT_BASE_URI=

Or modify the config/wefact.php file.

HostFact

When using HostFact, modify the config/wefact.php and set the type to \Spits\WeFactApi\HostFact::class.

Components

Each method supports default:

  • List
  • Find
  • Show
  • Create
  • Edit
  • Save

Additional methods will be documented on the component.

When passing the Identifier to the constructor, the object will automatically bind all the values to the class instance.

Debtor

CreditInvoice

use Spits\WeFactApi\Facades\WeFact;
WeFact::creditInvoice(1);

Creditor

use Spits\WeFactApi\Facades\WeFact;
WeFact::creditor(1);

Debtor

use Spits\WeFactApi\Facades\WeFact;
WeFact::debtor(1);

Domain

use Spits\WeFactApi\Facades\WeFact;
WeFact::domain(1);

DomainContact

use Spits\WeFactApi\Facades\WeFact;
WeFact::domainContact(1);

Group

use Spits\WeFactApi\Facades\WeFact;
WeFact::group(1);

Hosting

use Spits\WeFactApi\Facades\WeFact;
WeFact::hosting(1);

Invoice

use Spits\WeFactApi\Facades\WeFact;
WeFact::invoice(1);

Product

use Spits\WeFactApi\Facades\WeFact;
WeFact::product(1);

Quote

use Spits\WeFactApi\Facades\WeFact;
WeFact::quote(1);

Service

use Spits\WeFactApi\Facades\WeFact;
WeFact::service(1);

Ssl

use Spits\WeFactApi\Facades\WeFact;
WeFact::ssl(1);

Subscription

use Spits\WeFactApi\Facades\WeFact;
WeFact::subscription(1);

Ticket

use Spits\WeFactApi\Facades\WeFact;
WeFact::ticket(1);

Vps

use Spits\WeFactApi\Facades\WeFact;
WeFact::vps(1);