Insura Docs

Requirements

Insura 2.0's requirements are simply a web server running PHP >= 5.5.9 with the following extensions:-

OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension

Installation

This video shows how to install signer from step 1-4, for step 5 onwards continue reading the documentation and more videos included.

1) Extract files

Extract the zip file you downloaded from CodeCanyon in a directory where we will work from e.g. extract in /home/<user> to get /home/<user>/Insura-2.0(Recommended for users on shared hosting with cPanel). This location should be away from your webserver’s root directory.

2) Database setup

Insura supports a range of databases (MySQL, PostgreSQL, SQLite3 and SQL). Depending on your choice of database, create a new database and new user and password for it where applicable. Remember to note down the database nameand user and password where applicable as we will use this in step 4.

NB: If you are using SQLite, copy the sqlite file to /home/<user>/Insura-2.0/Files/database/ and note down the filename instead e.g. insura.sqlite.

3) Root directory

There are several ways to configure the root directory depending on your hosting setup.

  • If you can control your domain’s document root, e.g when creating a sub-domain in your control panel, point it to /home/<user>/Insura-2.0/Files/public.
  • If your root directory is in your home folder, e.g. /home/<user>/public_htmlwhere public_html is the root directory, follow these steps:-
    >> Back up your current root directory by renaming it i.e. public_html to public_html.backup.
    >> From our working directory created in STEP 1, copy the file called root_dir in Utils to your home folder.
    >> Rename root_dir to public_html
  • If your root directory is not in your home folder (e.g. /var/www/html where htmlis the root directory) or you intend to add as a folder on he root directory (e.g. /var/www/html/insura where html is the root directory), follow these steps:-.
    >> Create a symbolic link to /home/<user>/Insura-2.0/Files/public
    >> Replace your document root with the link (To have something like http://www.example.com) or add it to your document root as a folder (To have something like http://www.example.com/insura) as preferred. Ensure you rename the copied link correctly for it to work.

4) Web setup

Insura ships with a web installer accessible through your browser. After confirming that steps 1 – 3 were successfully completed, please navigate your browser to your domain e.g http://www.example.com or https://www.example.com/insura. A setup page will appear which guides you through the rest of the setup. Use the information we noted down in steps 1-3 to complete the forms. Ensure you key in the correct passwords where applicable.

NB: Ensure the webserver has read and write access to the storage and bootstrap folders and everything in them which can be found in in the /home/<user>/Insura-2.0/Files directory. Also, if you have an SSL certificate for your domain, please use the https:// scheme to access the site e.g https://www.example.com to improve security.
To make https a must when using apache, uncomment (Remove the preceding ‘#‘ character) lines #9 and #10 in the .htaccess file found in your new root directory created in Step 3 above like shown below:
Change

09    #RewriteCond %{HTTPS} !on
10 #RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

to

09    RewriteCond %{HTTPS} !on
10 RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

5) First sign in

If all went well and the setup was completed, CONGRATULATIONS! You should now be able to log in and use Insura. You could even ignore the rest of the steps… Just kidding! Move on to step 6.

NB: If you encountered an error and re-tried steps 1 – 4 with no luck, skip to the manual installation section.

6) Cron jobs

Insura uses cron jobs to automate reminders. You need to set a cron job that will do this on your server. Below is the sample cron job code. Modify the path to artisan to match your working folder, for our example this would be /home//Insura-2.0/Files/artisan. When this is done, Insura is fully ready to use, but if you want more, there’s more.

* * * * * php <path to artisan> schedule:run >> /dev/null 2>&1

Here is a great YouTube Video to help you with cron jobs if you are new.

7) Supercharge Insura

Insura uses laravel queues to send emails and texts in the background, therefore making your app faster. By basic installation the queue driver is set to sync which is slow, but if you want even more speed and true background execution, the database driver can be used. All you need is to change the queue driver and shell access to run a queue listener using these steps:-

  • >> In our working folder created in Step 01 (/home/<user>/Insura-2.0), navigate into Files. In there is a file named .env. If you cannot see it, ensure you have enabled viewing of hidden files in your file manager settings. This file stores all major settings of insura. Open this file and edit the line with
    QUEUE_DRIVER=sync
    to mathch the following:
QUEUE_DRIVER=database

Close and save the file

>> Then execute the following command in the Files directory to start the listener:
php artisan queue:work --daemon --queue default,emails,texts --tries 10 database >> /dev/null 2>&1 &
Here is an example of how that may go…

user@example.com:~/Insura-2.0/Files$ php artisan queue:work --daemon --queue default,emails,texts --tries 10 database >> /dev/null 2>&1 &
[1] 14638
user@example.com:~/Insura-2.0/Files$ _

That’s pretty much it by now. Feel free to rate us on CodeCanyon as you enjoy the awesome powers of Insura. To add a language to or translate Insura, see Translating Insura. To update your installation of Insura, see Update Insura.

Manual Installation

Below are instructions on how to install.

1) Database setup

In our working folder created in Step 01 (/home/<user>/Insura-2.0), there is a folder named Database which contains an SQL file named insura.sql. This file is the system’s MySQL database. Import this file (/home/<user>/Insura-2.0/Database/insura.sql) using phpMyAdmin or whatever system you use. Watch this video if you are new to importing SQL databases. Remember to note down the database name and MySQL user and password as we will use this in step 4.

2) Environment setup

In our working folder created in Step 01 (/home/<user>/Insura-2.0), navigate into Files/v2. In there is a file named .env. If you cannot see it, ensure you have enabled viewing of hidden files in your file manager settings. This file stores all major settings of insura. Open this file and edit these settings according to your setup. If you don’t know how, refer to the .env.example file in the same directory. If you have no use for a setting (e.g. You can use either Amazon SES, Mailgun, Mandrill, SMTP or sendmail for email, one but not both), leave it empty as it can be changed later. Below are the values you will most likely want to change to:

APP_ENV=production
APP_DEBUG=false
APP_URL=< e.g. https://www.example.com>
DB_DATABASE=<your insura database name>
DB_USERNAME=<your insura database username>
DB_PASSWORD=<the insura database password>
MAIL_USERNAME=<your mail login email>
SMTP_HOST=< e.g. mail.example.com in case you use SMTP>
SMTP_PASSWORD=<your mail login password in case you use SMTP>

NB: Never change the APP_KEY value unless you understand what you’re doing. Only the web installer can change this value safely.

3) Finish

At this point, it is safe to retry step 5, but no setup will be presented. You will be directed straight to the login page instead. Use the following credentials to log in:
Email: demo@simcycreative.com
Password: 123456

Please continue with setting Cron Jobs in Step 6 above.

Translating Insura

Adding a new Language to Insura? It's simple.
Keep in mind to add a new language to Insura, you may need some IT experience (not necessarily coding). Follow the steps indicated below:

1) Create New Language Folder

Create a new folder in /resources/lang/ in our working folder in Step 01 (Extract files). Name this folder an ISO version of the language you wish to translate to. I will use France’s French language to demonstrate so I will name my folder fr_FR where fr is the two character code that represents the French language and FR is the two character code that represents the country France. The result is a folder /resources/lang/fr_FR/

2) Copy Files for Translation

Copy all files in the folder /resources/lang/en_US/ to our newly created folder /resources/lang/fr_FR/. You should have the following files in it:

attachments.php
auth.php
brokers.php
clients.php
communication.php
companies.php
dashboard.php
emails.php
header.php
inbox.php
middleware.php
notes.php
pagination.php
passwords.php
payments.php
policies.php
products.php
reports.php
settings.php
setup.php
sidebar.php
staff.php
status.php
users.php
validation.php

3) Translate the language files

We will now do the actual language translations by editing the copied files. I will use an example to demonstrate how to go about this by translating the users.php file.
Initially, the file looks like this:

 1<?php
2
3return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | User Language Lines
8 |--------------------------------------------------------------------------
9 |
10 | The following language lines are the default lines which match text used
11 | with the User model on Insura.
12 |
13 */
14
15 'messages' => [
16 'error' => [
17 'missing' => 'No such user was found!'
18 ]
19 ],
20
21];
22

We will translate the values after the => sign only. This will give the result below:

 1<?php
2
3return [
4
5 /*
6 |--------------------------------------------------------------------------
7 | User Language Lines
8 |--------------------------------------------------------------------------
9 |
10 | The following language lines are the default lines which match text used
11 | with the User model on Insura.
12 |
13 */
14
15 'messages' => [
16 'error' => [
17 'missing' => 'Aucun utilisateur de ce type n'a été trouvé!'
18 ]
19 ],
20
21];
22

4) Add the new language to Insura’s Configuration

We will then add our new language to the /config/insura.php file at the languages section as shown below:

   1<?php

...

1543 'languages' => [
1544 [
1545 'identifiers' => ['en_US.UTF-8', 'en.UTF-8', 'en-US', 'en'],
1546 'locale' => 'en_US',
1547 'name' => 'English (US)'
1548 ],
1549 [
1550 'identifiers' => ['fr_FR.UTF-8', 'fr.UTF-8', 'fr-FR', 'fr'],
1551 'locale' => 'fr_FR',
1552 'name' => 'French (FR)'
1553 ]
1554 ],

...

Update Insura

Update Insura to a newer version.

  • <=2.0.0

    For versions below 2.0.1 (2.0.0)

    If you currently run Insura version 2.0.0 follow these instructions:

    1. Extract the update files over your current installation.
    2. Delete the /bootstrap/cache/config.php file.
    3. Delete the /bootstrap/cache/routes.php file.
    4. Navigate to http(s)://<Your Installation URL>/update on your browser.
  • >=2.0.1

    For versions above 2.0.0 (>=2.0.1)

    If you currently run Insura version 2.0.1 or greater follow these instructions:

    1. Extract the update files over your current installation.
    2. Navigate to http(s)://<Your Installation URL>/update on your browser.
  • NOTE

    Do NOT update insura using the above method if you do not want to loose any customization already done.

    Do NOT use a release archive for updating unless you intend to start afresh. Doing so will erase all your configurations and replace all files to default. ONLY use update archives.

Need Support?

If you still need more information about Insura or support please feel free
to get in touch and we will respond as soon as possible.