# Developers Documentation

## Casual Fitness v3.1 — Installation guide

Below we will go through the steps and proccess to install the application on your servers main domain or subdomain,if you are planning to install the app on a subdomain, please checkout the section for installation on sub domain.

- Version: 3.1
- Author: SpantikLab

- Created: 21 Feb, 2019
- Update: 01 Sep, 2024

If you have any questions that are beyond the scope of this help file, Please feel free to email via Item Support Page.

## Server requirements

- Minimum PHP version greater or equal to 8.2
- File Uploads feature needs to be enabled!
- MySQL PDO feature needs to be enabled!
- fileinfo extension needs to be loaded!
- ZIP extension needs to be loaded!

## Installation

##### using cPanel, Plesk or other control panel

### Step 1

Download the application zip package from CodeCanyon and log in to cPanel (or other control panel).

### Step 2

Open File Manager, upload the downloaded zip package to public_html folder (web root folder of your domain or subdomain), right click on the archive and choose Extract, After that naviagate into the Source Files directory and move all files into the root directory.

#### Important

Please ensure that Show hidden files option is enabled before you extract the files (File Manager » Settings):

### Step 3

Open MySQL Databases page, create a new MySQL database, create a new user and add the user to the database selecting All privileges like this:

### Step 4

Now, open new tab of the browser and type your domain name in the search field, like this https://my-website.com/setup, ensure to write /setup at the end of your domain.

### Step 5

After completing all the Server Requirements listed above, you will be asked to proceed to next step.

### Step 6

In the next step you will be asked to provide the Database details, enter the details of the Database you created earlier and press the Submit button.

### Step 7

After the successful connection with the Database, The Tables will be created inside the database with default settings, later you can change them from the application, under `Sidebar/Settings`

### Step 8

After the above step, a Admin user is created and you will be asked to create a password, the password must be of at least Nine characters, however you can change the details later from inside the application or create more users, after that you will be redirected to the Login Page, enter the credentials you mentioned in the last step and login to the dashboard.

Now, the application is installed successfully, you can change the application details from the Settings page
To change settings, goto `Sidebar/Settings`
To create new users, goto `Sidebar/Users`
To create new user role, goto `Sidebar/Role`

Detail guide on the application usage is discussed in the User Guide Documentation, please find the file named UserGuide.html

##### Installing under a Sub Domain

In case you want to install the application under a sub domain, there is a additional minor step to implement, rest of the process is similar as discussed under section `using cPanel, Plesk or other control panel` , here the additional step.

### Sub Domain Root Directory Path

When registering a sub domain, make sure the root directory path points to the `your-subdomain-directory/public`

After updating the path, you can continue with the setup process by navigating to the `your-subdomain/setup` from your desired web browser.

##### using SSH client

### Step 1

Install and configure a LAMP stack (Linux, Apache, MySQL, PHP). If your server comes with Ubuntu OS you can use this guide, for other operating systems find the corresponding manual.

### Important

Make sure that URL rewrite is enabled. You can do it by running the following command:

`a2enmod rewrite`

Also make sure that .htaccess files are allowed (AllowOverride directive is set to All) either globally or in the virtual host config file. To enable it on the virtual host level add the following block to the virtual host config file (/etc/apache2/sites-enabled/mywebsite.conf):

    <VirtualHost *:80>
      ...

      <Directory /var/www/mywebsite.com/>
        Options FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
        Order allow,deny
        allow from all
      </Directory>
    </VirtualHost>

Please note that you need to restart the Apache service after making configuration changes.

#### Nginx web server

If you are deploying your application to a server that is running Nginx web server, please read this guide.

### Step 2

Create a new MySQL database, create a new user and add the user to the database. You can do so by logging in to MySQL as root and running the following commands:

``CREATE DATABASE cf_db CHARACTER SET utf8 COLLATE utf8_general_ci;` `CREATE USER 'user'@'localhost' IDENTIFIED BY 'password123';` `GRANT ALL PRIVILEGES ON user.* TO 'user'@'localhost';``

### Step 3

Download the application zip package from CodeCanyon, upload it to the web root folder of your domain and unzip.

#### Important

Make sure that the user your web server is running under (usually www-data) has read and write access to the application files and folders. The easiest way to set it up is to make the www-data user owner of the application files and folders recursively. It can be done as follows (assuming /var/www/mywebsite.com is the web root folder):

``cd /var/www` `chown -R www-data mywebsite.com``

### Step 4

Now in root folder of the app open .env file and update the following:

``APP_URL=your-url-here`` ``APP_INSTALLED=true`` ``DB_DATABASE=your-database-name-here` `DB_USERNAME=your-database-username-here` `DB_PASSWORD=your-database-password-here``

### Step 5

Now from server open phpmyadmin go to your database. Select import and choose the file database.sql located in `database/database.sql`

Now app is ready to be run on the browser.
Default Login Credentials:
Admin: Email: admin@gmail.com | Password: 123456789
In case you installed the application under a subdomain, make sure that root directory should be pointed at `your-subdomain-directory/public`

Now you can Login into the application, in case any issue try to add complete url like, `your-subdomain/login`

##### Local Development Setup

For local development setup please go through the Laravel offical documentation, the steps are similar. All source files are included, you can customize the application easily as per your need.

Laravel Offical Development Setup Guide

## FAQ

A FAQ is a list of frequently asked questions (FAQs) and answers on a particular topic.

##### I get "404 Not Found" error during installation

This error occurs if:

- .htaccess files are missing
- .htaccess files are not allowed (AllowOverride directive is set to None)
- Apache Rewrite module is not enabled

Please follow the installation steps again.

##### I get "406 Not Acceptable" error during installation

This error occurs if a request has been blocked by Mod Security Apache module. Please contact your hosting support and ask them to disable Mod Security module.

## Technology Used

The application is built using the following technologies, and you can refer to the documentation for more detailed information:

Laravel 10.x: Laravel serves as the backend framework of the application. It is a robust and scalable PHP framework known for its elegant syntax and extensive set of tools, making it ideal for building modern web applications. Laravel handles server-side logic, routing, authentication, and database interactions. The application uses MySQL as the database management system, allowing for efficient and secure data storage and retrieval.

AdminLTE: AdminLTE is employed for the frontend user interface (UI). It is a popular open-source admin dashboard template built on Bootstrap. AdminLTE provides a responsive and visually appealing interface with a wide range of UI components, making it easier to create a user-friendly and feature-rich admin panel for managing the application.

These technologies together ensure a smooth, efficient, and secure operation of the application, offering both developers and users a high-quality experience.

## Support

If this documentation doesn't answer your questions, So, Please send us Email via Item Support Page

We are located in GMT +5:30 time zone and we answer all questions within 12-24 hours in weekdays. In some rare cases the waiting time can be to 48 hours. (except holiday seasons which might take longer).

Note: While we aim to provide the best support possible, please keep in mind that it only extends to verified buyers and only to issues related to our template like bugs and errors. Custom modifications or third party module implementations are not included.

#### Don’t forget to Rate this template

Please Add your Review (Opinion) for Our application. It would be a great support for us.
Go to your CodeCanyon Profile > Downloads Tab > & then You can Rate & Review for our application.
Thank You.

## More Items

Checkout Our Below Premium Items

###### Medix - The Pharmacy POS & Management System

###### Bedana - Selling, Purchasing and Invoicing application

###### Event Start - Event Management System

###### Luxus - Real Estate WordPress Theme

###### Pencil - The Retail Store and Distribution Software

Our Portfolio