Configure¶

Review the .env.example file to see additional settings.

Recurring invoices and reminder emails¶

Create a cron to call the ninja:send-invoices and ninja:send-reminders commands once daily.

0 8 * * * /usr/local/bin/php /path/to/ninja/artisan ninja:send-invoices 0 8 * * * /usr/local/bin/php /path/to/ninja/artisan ninja:send-reminders

If you server doesn’t support crons commands can be run by setting a value for COMMAND_SECRET in the .env file and then loading /run_command?command=&secret= . The following commands are supported: send-invoices, send-reminders and update-key.

Email Queues¶

When sending an email in the app the default behavior is to wait for the response, you can use queues to improve the perceived performance. To enable the feature add QUEUE_DRIVER=database or QUEUE_DRIVER=redis to the .env file.

You can process the jobs by running php artisan queue:listen or php artisan queue:work --daemon .

Postmark bounce and open notifications¶

Include the following two setting in the .env file, the rest of the email settings can be commented out.

POSTMARK_API_TOKEN= MAIL_FROM_ADDRESS= 

In your Postmark account settings make sure ‘Open tracking’ is enabled and enter the following values under Settings > Outbound.

Social/One-Click Login¶

Create an application in either Google, Facebook, GitHub or LinkedIn and then set the client id, secret and redirect URL in the .env file. For example:

GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= GOOGLE_OAUTH_REDIRECT=http://ninja.test/auth/google

PhantomJS¶

There are two methods to attach PDFs to emails sent by background processes: phantomjscloud.com or local PhantomJS install.

To use phantomjscloud.com check for the following line in the .env file.

PHANTOMJS_CLOUD_KEY='a-demo-key-with-low-quota-per-ip-address' 

To use a local PhantomJS install add PHANTOMJS_BIN_PATH=/usr/local/bin/phantomjs .

Troubleshooting¶

Custom Fonts¶

Follow these steps to add custom ttf fonts: ie, Google fonts

Omnipay¶

We use Omnipay to support our payment gateway integrations.

Follow these steps to add a custom driver.

Most drivers also require code changes to work correctly.

Security¶

To require a password to update the app add UPDATE_SECRET=random_value to the .env file and then use /update?secret=random_value to update.

By default the app clears the session when the browser is closed and automatically logs the user out after 8 hours. This can be modified by setting REMEMBER_ME_ENABLED and AUTO_LOGOUT_SECONDS in the .env file.

To include a secret when notifying subscriptions add SUBSCRIPTION_SECRET=random_value to the .env file.

Google Map¶

You need to create a Google Maps API key for the Javascript, Geocoding and Embed APIs and then add GOOGLE_MAPS_API_KEY=your_key to the .env file.

You can disable the feature by adding GOOGLE_MAPS_ENABLED=false to the .env file.

Voice Commands¶

Supporting voice commands requires creating a LUIS.ai subscription key, then set the following values in the .env file.

SPEECH_ENABLED=true MSBOT_LUIS_SUBSCRIPTION_KEY=.

Lock Invoices¶

Adding LOCK_SENT_INVOICES=true to the .env file will prevent changing an invoice once it has been sent.

Using a (Reverse) Proxy¶

If you need to set a list of trusted (reverse) proxies you can add a TRUSTED_PROXIES value in the .env file. ie,

TRUSTED_PROXIES='10.0.0.0/8,172.16.0.0/12,192.168.0.0/16' 

Customizations¶

Our developer guide has more details about our application’s codebase.

You can add currencies and date/time formats by adding records to their respective tables in the database. This data is cached, to clear it load any page with ?clear_cache=true added to the end of the URL.

The JavaScript and CSS files are compiled to built files, you can recompile them by running bower install and then gulp .

© Copyright 2017, Invoice Ninja Revision 51133b23 .

Built with Sphinx using a theme provided by Read the Docs. Read the Docs v: latest

Versions latest stable v5.0 Downloads pdf html epub On Read the Docs Project Home Builds Free document hosting provided by Read the Docs.