Skip to main content

Overview

Taxation is a tricky business and sometimes what Lunar offers simply won’t be enough, and we completely understand. This why Taxation is driver based, so you can add your own logic if you need to. By default we have a SystemTaxManager which will use Lunar’s internal models and database as outlined above. If you need to write our own implementation, or if you’re creating an add on for Tax, you can change the driver in the config/taxes.php config file.

Writing Your Own Driver

To write your own driver you need to add a class which implements the Lunar\Base\TaxManager interface and has the following methods:
Once you have that, just extend the tax manager in your service provider.
You can then set this as the driver in the taxes config.