PHPackages                             ttbooking/fiscal-registrar - 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. ttbooking/fiscal-registrar

ActiveLibrary

ttbooking/fiscal-registrar
==========================

Fiscal Registrar service.

v1.7.0(1mo ago)1154MITPHPPHP ^8.2

Since Mar 16Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ttbooking/fiscal-registrar)[ Packagist](https://packagist.org/packages/ttbooking/fiscal-registrar)[ RSS](/packages/ttbooking-fiscal-registrar/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (22)Versions (152)Used By (0)

1. Overview
===========

[](#1-overview)

This Laravel package intended to make, store and process 54FZ-compatible receipts accepted by the *Tax Service of Russian Federation* through *Fiscal Data Operators* (FDO, *ru* ОФД). For the time being it supports most of the *Fiscal Data Format* (FDF, *ru* ФФД) 1.05 tags and *ATOL Online* service API v4 via supplemented driver.

2. Requirements
===============

[](#2-requirements)

- PHP 8.2 or greater;
- Laravel Framework 10 or greater;
- Highly recommended: RDBMS with JSON column support;
- ATOL Online &amp; FDO contracts and connection requisites (not needed for testing purposes).

3. Installation
===============

[](#3-installation)

Installation process is simple and straightforward as for almost any Laravel package.

You can install Fiscal Registrar package via Composer: `composer require ttbooking/fiscal-registrar`

Package service provider and facade aliases will be automatically registered in your application if package discovery is configured for your project.

Next, you'll need to publish package configuration file (required) and database migration (optional, if you need to change table name or add columns, etc):

```
# Publish configuration
php artisan vendor:publish --provider=TTBooking\FiscalRegistrar\FiscalRegistrarServiceProvider --tag=config

# Publish migration
php artisan vendor:publish --provider=TTBooking\FiscalRegistrar\FiscalRegistrarServiceProvider --tag=migrations

# Publish everything package-related
php artisan vendor:publish --provider=TTBooking\FiscalRegistrar\FiscalRegistrarServiceProvider
```

Then, if you've published migration, you'll need to make needed changes to it before proceeding to the next step. In a default Laravel installation, look it up here: {/database/migrations/blahblah\_receipts.php}.

Finally, you should apply database migration, which will create table for receipt storage: `php artisan migrate`

4. Configuration
================

[](#4-configuration)

4.1. Using customizable receipt model
-------------------------------------

[](#41-using-customizable-receipt-model)

First, if you made changes to the database migration (especially table name) during package installation, this step is mandatory. Otherwise, it is completely optional. Create Eloquent model in your application's Models namespace (or somewhere else), say (`App\Models\Receipt`), and extend it from the package supplemented default implementation (`TTBooking\FiscalRegistrar\Models\Receipt`). Final result will look like this:

```
