PHPackages                             zsolt148/szamlazzhu - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. zsolt148/szamlazzhu

ActiveLibrary

zsolt148/szamlazzhu
===================

This is my package szamlazzhu

v1.1.1(2y ago)06MITPHPPHP ^8.1

Since Dec 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Zsolt148/szamlazzhu)[ Packagist](https://packagist.org/packages/zsolt148/szamlazzhu)[ Docs](https://github.com/zsolt148/szamlazzhu)[ RSS](/packages/zsolt148-szamlazzhu/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (13)Versions (6)Used By (0)

This is my package szamlazzhu
=============================

[](#this-is-my-package-szamlazzhu)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b66a90004f9a7fa9d4254759e0a468e6f71aadebb217fc7561f0231d7b5b2f76/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a736f6c743134382f737a616d6c617a7a68752e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zsolt148/szamlazzhu)[![GitHub Tests Action Status](https://camo.githubusercontent.com/0db155d75844356e49f0e0ba3f373af32d122dd55e858bea7df2f867ab4b0635/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a736f6c743134382f737a616d6c617a7a68752f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/zsolt148/szamlazzhu/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/081a3020d7a899b8d9e7e53453e3d0cf0eda514d080df6ea15eccd2da1962b72/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a736f6c743134382f737a616d6c617a7a68752f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/zsolt148/szamlazzhu/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0e2f9e51966400c48f824f59e8d7207ae109e13578f97f7f74e0df674cd00298/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a736f6c743134382f737a616d6c617a7a68752e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zsolt148/szamlazzhu)

Built on top of  Laravel szamlazzhu as an simple Facade.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require zsolt148/szamlazzhu
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="szamlazzhu-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="szamlazzhu-config"
```

This is the contents of the published config file:

```
return [

    /**
     * Global disabled/enable function
     */
    'enabled' => env('SZAMLAZZ_HU_ENABLED', false),

    /**
     * Global discount disabled/enable function
     */
    'discount_enabled' => env('SZAMLAZZ_HU_DISCOUNT_ENABLED', false),

    /**
     * Send invoice/receipt notifications
     */
    'send_notifications' => env('SZAMLAZZ_HU_SEND_NOTIFICATIONS', true),

    /**
     * Create/cancel invoice/receipt routes
     */
    'route' => [
        'prefix' => 'szamlazzhu',
        'name' => 'szamlazzhu.',
        'middleware' => ['web'],
    ],

    /*
     * These merchant details will be used by default.
     * You can override these values.
     * */
    'merchant' => [
        'bank_name' => env('SZAMLAZZ_HU_MERCHANT_BANK_NAME'),
        'bank_account_number' => env('SZAMLAZZ_HU_MERCHANT_BANK_ACCOUNT_NUMBER'),
        'reply_email' => env('SZAMLAZZ_HU_MERCHANT_REPLY_EMAIL'),
    ],

    /*
     * Invoice/Receipt prefix
     */
    'prefix' => env('SZAMLAZZ_HU_PREFIX', 'PRE'),

    /*
     * API Client settings
     */
    'client' => [

        /*
         * Authentication credentials.
         * */
        'credentials' => [
            'api_key' => env('SZAMLAZZ_HU_API_KEY'),
            'username' => env('SZAMLAZZ_HU_USERNAME'),
            'password' => env('SZAMLAZZ_HU_PASSWORD'),
        ],

        /*
         * You can enable the certificate based communication.
         * You do not need to provide password if you'll use szamlazz.hu's own certificate
         * */
        'certificate' => [
            'enabled' => false,
            'disk' => 'local',
            'path' => 'szamlazzhu/cacert.pem', // Relative to disk root
        ],

        /*
         * HTTP request timeout (in seconds)
         */
        'timeout' => 30,

        /*
         * Base URI used to reach API
         * */
        'base_uri' => env('SZAMLAZZ_HU_BASE_URI', 'https://www.szamlazz.hu/'),

        /*
         * Client can automatically save / update invoice PDF files if enabled
         * */
        'storage' => [
            'auto_save' => true,
            'disk' => 'public',
            'path' => 'invoices',
        ],
    ],
```

Usage
-----

[](#usage)

#### Using the global helper

[](#using-the-global-helper)

```
// Access the invoice service
szamlazzhu()->invoice();
szamlazzhu('invoice');

// Access the receipt service
szamlazzhu()->receipt();
szamlazzhu('receipt');

// Create invoice/receipt - dispatches an event
szamlazzhu()->invoice()->create($invoiceable);
szamlazzhu()->receipt()->create($invoiceable);

// Create now
szamlazzhu()->invoice()->createNow($invoiceable);
szamlazzhu()->receipt()->createNow($invoiceable);

// Cancel invoice/receipt
szamlazzhu()->invoice()->cancel($invoice);
szamlazzhu()->receipt()->cancel($receipt);
```

#### Using the facade

[](#using-the-facade)

```
use Zsolt148\Szamlazzhu\Facades\Szamlazzhu;

// Access the invoice service
Szamlazzhu::invoice();

// Access the receipt service
Szamlazzhu::receipt();

// Create invoice/receipt - dispatches an event
Szamlazzhu::invoice()->create($invoiceable);
Szamlazzhu::receipt()->create($invoiceable);

// Create now
Szamlazzhu::invoice()->createNow($invoiceable);
Szamlazzhu::receipt()->createNow($invoiceable);

// Cancel invoice/receipt
Szamlazzhu::invoice()->cancel($invoice);
Szamlazzhu::receipt()->cancel($receipt);
```

#### The model you want to be invoiceable/receiptable should implement the Invoiceable/Receiptable interface, with HasInvoice/HasReceipt traits.

[](#the-model-you-want-to-be-invoiceablereceiptable-should-implement-the-invoiceablereceiptable-interface-with-hasinvoicehasreceipt-traits)

```
use Zsolt148\Szamlazzhu\Interfaces\Invoiceable;
use Zsolt148\Szamlazzhu\Traits\HasInvoices;

class Order implements Invoiceable
{
    use HasInvoices;
    ...
}
```

#### The model you want be as invoice/receipt items should implement the ArrayableItem

[](#the-model-you-want-be-as-invoicereceipt-items-should-implement-the-arrayableitem)

If the model will has only one item, it can be the Order model as well.

```
use zoparga\SzamlazzHu\Contracts\ArrayableItem;

class OrderItem implements ArrayableItem
{
    ...
}
```

#### Using the default routes, it should receive a class string and an ID.

[](#using-the-default-routes-it-should-receive-a-class-string-and-an-id)

Returns a json response

```
await axios.post(route('szamlazzhu.create-receipt'), {
    class: this.model.class,
    id: this.model.id,
}).then(resp => {
    console.log(resp.data)
})
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Zsolt148](https://github.com/Zsolt148)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

893d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/15cc069dbb4e7a1a51adbccd243d5f97bb6ed8343f142326b019b3194f6a37f1?d=identicon)[Zsolt148](/maintainers/Zsolt148)

---

Top Contributors

[![Zsolt148](https://avatars.githubusercontent.com/u/33789145?v=4)](https://github.com/Zsolt148 "Zsolt148 (17 commits)")

---

Tags

laravelszamlazz.huZsolt148

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/zsolt148-szamlazzhu/health.svg)

```
[![Health](https://phpackages.com/badges/zsolt148-szamlazzhu/health.svg)](https://phpackages.com/packages/zsolt148-szamlazzhu)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
