Download the PHP package sharpapi/laravel-invoice-manager without Composer

On this page you can find all versions of the php package sharpapi/laravel-invoice-manager. 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-invoice-manager

SharpAPI GitHub cover

Invoice Manager for Laravel: AI Invoice Parsing, Database and Nova Admin (powered by SharpAPI)

Turn any invoice (PDF, scan, or photo) into clean, queryable database rows and a ready-made admin UI, with one command.

Latest Version on Packagist Total Downloads

laravel-invoice-manager is the batteries-included layer on top of the SharpAPI Invoice Parser. The SharpAPI endpoint reads an invoice and returns 100+ structured fields. This package takes that result and does the part you would otherwise build by hand: a battle-tested database schema, Eloquent models, an idempotent importer, a queued job, an artisan command, and optional Laravel Nova resources.

You run one command. You get a fully populated invoices table with line items, tax details, seller and buyer parties, bank details, and the complete raw payload, all related and ready to query.

Architecture at a glance

This package owns the blue boxes: the import command and job, the InvoiceImporter, the InvoiceImported event, and the optional Nova admin. The parsing itself is delegated to sharpapi/laravel-invoice-parser, which calls the SharpAPI endpoint. See Data model for the full schema.


Why this exists (the value)

Manual invoice processing costs businesses an average of $15 to $40 per invoice once you add up labor, errors, and delays. It is the single biggest source of accounts payable mistakes. The SharpAPI Invoice Parser takes that from minutes per invoice to seconds and removes manual data entry entirely.

But the parser hands you JSON. To actually use it you still need a schema, models, a mapper that handles missing fields and empty strings, idempotency so retries do not duplicate rows, and an admin screen so your team can see what came in. That is days to weeks of work, and it is the same work for every project.

This package is that work, done once, the right way:

If you process invoices in Laravel, this is the shortest path from a file on disk to structured, managed data.


Key Features


How it relates to laravel-invoice-parser

This package builds on top of sharpapi/laravel-invoice-parser, the thin SDK that calls the SharpAPI endpoint. It does not reimplement the API call; it depends on the parser and reuses its InvoiceParserService.

Package Responsibility
sharpapi/laravel-invoice-parser Calls the SharpAPI endpoint, returns the raw structured JSON.
sharpapi/laravel-invoice-manager Stores that JSON in a managed database and gives you models, jobs, a command, and a Nova admin.

Install the manager and the parser comes with it.


Use Cases


Requirements


Installation

  1. Install the package via composer:

  2. Register at SharpAPI.com to obtain your API key.

  3. Set the API key in your .env file (used by the underlying parser):

  4. Run the migrations (tables are created with the invoice_ prefix by default):

  5. [OPTIONAL] Publish the configuration file:

  6. [OPTIONAL] Publish the migrations to customize them before running:

Quickstart

1. Artisan command

Parse and store an invoice inline (hits SharpAPI with your key):

On success it prints a table of the stored invoices:

Drop --sync to dispatch the work to a queue instead:

2. Queued job

The job parses the file with SharpAPI, then persists every invoice in the result. Configure the queue connection and name in config/sharpapi-invoice-manager.php.

3. Service (full control)

If you already have a parse result (for example from a webhook), store it directly:

Listen for imports

Every successful import fires an event:


How an import flows

On import the mapper coerces empty strings to null, numeric strings to numbers, and date strings to Carbon dates. The whole element is also stored verbatim in raw_payload for lossless re-processing.


Data model (all tables and fields)

All tables use the configurable invoice_ prefix (shown without the prefix below). Money columns are decimal(15,2), dates are real date columns, and empty strings from the API are coerced to null.

Table Holds
invoices One row per detected invoice: document, invoice, and financial scalars as real columns; references, e-invoice, sales info, payment, logistics, and source pages as JSON; plus the full raw_payload.
invoice_parties One seller and one buyer per invoice, with billing and delivery addresses flattened to columns.
invoice_bank_details Bank accounts belonging to a party.
invoice_line_items Every line item, with money and quantities as decimals and date fields as real dates.
invoice_tax_details Tax breakdown rows (type, rate, taxable amount, tax amount).

Eloquent models

The package ships five Eloquent models (namespace SharpAPI\InvoiceManager\Models). Each can be swapped for your own subclass via the models.* config keys.

Model Backing table Config key Relationships and helpers
Invoice invoices models.invoice lineItems, taxDetails, parties, seller, buyer, total accessor
InvoiceParty invoice_parties models.party invoice, bankDetails, sellers() / buyers() scopes
InvoiceBankDetail invoice_bank_details models.bank_detail party
InvoiceLineItem invoice_line_items models.line_item invoice
InvoiceTaxDetail invoice_tax_details models.tax_detail invoice

Configuration

config/sharpapi-invoice-manager.php:

Point any models.* entry at your own subclass to add behaviour without forking the package.


Laravel Nova admin

If Laravel Nova is installed and nova.enabled is true, the package registers an Invoice resource automatically, with the line items, tax details, and parties exposed as related resources, and the raw JSON groups shown as read-only code fields. No manual registration required.

If Nova is not installed, nothing happens and the rest of the package works exactly the same.

The package ships five Nova resources (namespace SharpAPI\InvoiceManager\Nova), listed separately from the Eloquent models above. Only the top-level Invoice resource appears in the navigation; the rest are exposed as related (HasMany) sub-resources from the invoice detail view.

Nova resource Backing model In navigation Key fields and panels
Nova\Invoice Invoice Yes (group "Invoices") Index: invoice number, seller, buyer, currency, total, issue date. Detail panels: Document, Invoice, Financials, Raw Groups (references, e-invoice, payment, logistics, sales info, raw payload as read-only code fields). HasMany: line items, tax details, parties.
Nova\InvoiceParty InvoiceParty No (sub-resource) Role, name, VAT id, registration number, addresses, contact JSON. HasMany bank details.
Nova\InvoiceLineItem InvoiceLineItem No (sub-resource) Line number, description, quantity, unit price, subtotal, tax, totals, codes, expiry date.
Nova\InvoiceTaxDetail InvoiceTaxDetail No (sub-resource) Tax type, rate, taxable amount, tax amount.
Nova\InvoiceBankDetail InvoiceBankDetail No (sub-resource) Bank name, account name, account number, SWIFT, IBAN.

To point the admin at your own customized resource, set nova.resource in the config to your subclass. The sub-resources are registered automatically alongside it.


Testing

The suite runs fully offline against a committed fixture using Orchestra Testbench and in-memory SQLite. No API key and no network access are required.


Suggested GitHub topics

laravel-invoice-manager, invoice-management, laravel-invoice, ai-invoice-parser, accounts-payable, laravel-nova, nova-resource, invoice-database, invoice-ocr, sharpapi


Support & Feedback

For issues or suggestions, please:


Changelog

Please see CHANGELOG for a detailed list of changes.


Credits


License

The MIT License (MIT). Please see License File for more information.


Follow Us

Stay updated with news, tutorials, and case studies:


All versions of laravel-invoice-manager with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
laravel/framework Version ^10.48.29|^11.0|^12.0|^13.0
sharpapi/laravel-invoice-parser Version ^1.0
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 sharpapi/laravel-invoice-manager contains the following files

Loading the files please wait ...