Download the PHP package academe/laravel-journal without Composer

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

Laravel Journal

Latest Version on Packagist CI Total Downloads

Accounting journals and double-entry bookkeeping for Eloquent models.

Give any Eloquent model its own accounting journal, post credits and debits to it in moneyphp/money amounts, read back running balances, and — when you need it — enforce proper double-entry bookkeeping across journals grouped into ledgers.

This package is a modernised, journal-centric conversion of consilience/accounting, itself a fork of the original scottlaurent/accounting package. If you're upgrading from either of those, see UPGRADE.md.

Why this package

Structure at a glance

Any model can own a journal (the HasJournal owner morph). Transactions can point back at any other model — an invoice, an order, a product — via their own reference morph. Checkpoints store a journal's cumulative totals and lock the period behind them, and journals may — but don't have to — be grouped under typed ledgers for double-entry reporting.

Requirements

Installation

The service provider is auto-discovered. The config publish is optional — the package config is merged automatically. Publishing the migrations is required on fresh installs: the package deliberately does not auto-load its migrations, so nothing is created until you publish and run them. If you are upgrading from consilience/accounting, do not run them — use the rename migration in UPGRADE.md instead.

Quick start

Add the HasJournal trait to any model that should own a journal:

Then initialise a journal and start posting:

To give every new instance of a model a journal automatically, call initJournal() from the model's created event instead of by hand:

With no arguments, initJournal() uses config('journal.base_currency').

How it works

The finer points live in the focused pages below: when the cached balance is recomputed and how stale instances behave in configuration, and currency guarding on posting in double entry.

Why journals are owned by models

A journal belongs to your application, not to the package: it is owned by one of your own models, and that owner is what gives it meaning. The package handles only the money side — currency, cached balance, transactions, checkpoints — while everything that makes the account mean something to your application (its name, its description, who may see it, when it is created or archived) lives on the owner, where your application already manages those concerns. That is why the journals table stores no name and no description: a journal's identity is entirely delegated to its owner. The owner morph is non-nullable and unique per (owner_type, owner_id) pair, so the relationship is strictly one-to-one — a journals row means nothing on its own; it is "the journal of User #42".

Owners tend to fall into two camps:

One consequence of the unique index: a model that needs several journals — a multi-currency wallet, say — can't own them all directly. Introduce a child model (one row per currency, for example) and hang one journal off each.

Documentation

Focused guides live under docs/:

Upgrading from consilience/accounting or scottlaurent/accounting, or between versions of this package: UPGRADE.md.

For a complete worked example, see academe/laravel-journal-window-cleaner-demo: "Shiny & Sons", a VAT-registered window cleaning round with six months of seeded history, running its bookkeeping on this package. Customer balances are journals, every charge and payment commits as a balanced TransactionGroup with the VAT split out, and typed ledgers keep the accounting equation live — plus month close on checkpoints and a quarterly VAT return read straight off the VAT journal. SQLite only, no build step.

Roadmap

Planned follow-up work:

The core stays pure bookkeeping mechanics: higher-level accounting concepts — invoices, payments, allocation and clearing — are for packages layered on top, not this one.

Licence

MIT. See LICENSE.txt.


All versions of laravel-journal with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/database Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
moneyphp/money Version ^4.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 academe/laravel-journal contains the following files

Loading the files please wait ...