# cPanel Server Laravel (GUI)

### **Getting Started Taxido API Deployment**

**1. Open Taxido-laravel directory that you downloaded from CodeCanyon.**

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/Taxido-laravel-folder.png" alt=""><figcaption></figcaption></figure>

**2. Building Assets and SCSS:**

**Note:** Please make sure you've installed NodeJs. If you haven't installed, you can easily do by following this link: [Link to Laravel Prerequisites.](https://docs.pixelstrap.net/laravel/taxido/laravel-requirment.html#nodejs)

To set up and compile your assets and SCSS files, follow these steps:

First, you need to install the necessary Node modules.

```html
npm i
```

Compile assets and scss by running below command.

```html
npm run build
```

**3. Create a .zip file**

Zip all files and folders in the Taxido-laravel folder and upload it to your cPanel server.

Delete the node\_modules folder from the project or exclude it when creating the zip file.

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/vps/env.png" alt=""><figcaption></figcaption></figure>

**4. Create Subdomain**

Login to your cPanel server and click on domains in the domains section.

Create separate subdomains for Taxido Laravel.

```html
your-domain.com -> Taxido-laravel.

```

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/cPanel/cpanel-domain.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FTatKtKTM0KpmPy3AC5BV%2Fimage.png?alt=media&#x26;token=ae868e87-de6b-422e-86fe-fb211ccc838d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FMRBEezqnvG79nOVAJChj%2Fimage.png?alt=media&#x26;token=b5498028-e685-4ab5-b298-c2039be0a309" alt=""><figcaption></figcaption></figure>

<figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FU5R44d51yAQ0R9f20Jpu%2Fimage.png?alt=media&#x26;token=ce44d778-e8fc-4d8b-8baa-9cc570efd8c0" alt=""><figcaption></figcaption></figure>

**5. Upload Zip file on cPanel:**

Upload the Taxido-laravel zip file in the laravel's subdomain (api.your-domain.com).

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/cPanel/cpanel-upload.png" alt=""><figcaption></figcaption></figure>

Click on the Go Back link after the file is 100% uploaded.

**6. Extract Laravel Zip File**

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/cPanel/cpanel-extract.png" alt=""><figcaption></figcaption></figure>

**7. Create MySQL Database:**

Now move to cpanel manager and go to > MySQL Database Wizard

<figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2F4QAXnpFDIin57oJqO4qv%2Fimage.png?alt=media&#x26;token=ce8e0824-6649-45c0-b605-215b25bdae47" alt=""><figcaption></figcaption></figure>

Create database in MySQL Database Wizard

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/cPanel/cpanel-database-2.png" alt=""><figcaption></figcaption></figure>

Create database users and remember their passwords for the installation process.

<figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FZ6KUCkJXY9VtPNXoT5Z6%2Fimage.png?alt=media&#x26;token=11088a6a-6457-48a4-8b2e-43886c7e8512" alt=""><figcaption></figcaption></figure>

Add a user to the database, give them all the necessary permissions, and then click 'Make Changes.' After that, click 'Next Step.

<figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FQ7aKnvDrdYAP1jrGtkHV%2Fimage.png?alt=media&#x26;token=39db98e9-d33c-4ac6-94d8-772e89a6b72c" alt=""><figcaption></figcaption></figure>

&#x20;Make a note of the database user, database name, and database password after creating the database.

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/cPanel/cpanel-databse-5.png" alt=""><figcaption></figcaption></figure>

**8. Update Environment File**

After creating the MySQL database, go to Taxido-laravel folder from your cPanel file manager and edit **.env** file.

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/cPanel/cpanel-4.png" alt=""><figcaption></figcaption></figure>

Add Laravel base url in APP\_URL key.

Also, change local to production in APP\_ENV.

Add MySQL database credentials.

Add you Taxido-laravel primary domain url like a APP\_URL=<http://your-domain.com>.

```html
APP_URL=https://your-domain.com
APP_ENV=production
DB_DATABASE=your_db_name
DB_USERNAME=your_db_username
DB_PASSWORD=your_db_password
```

{% hint style="warning" %}
Note: Make sure to set the APP\_URL correctly. If you don't, features like uploading, downloading, and showing images won't work properly. Be sure to double-check and make sure everything is set up correctly.
{% endhint %}

<figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FpZGnSE3EWyr3yMwqp5Ca%2Fimage.png?alt=media&#x26;token=76f9cd09-0025-4ff3-9ac4-a99990363a8d" alt=""><figcaption></figcaption></figure>

**9. Open cPanel Terminal**

Enter terminal in cPanel search bar and select terminal.

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/cPanel/cpanel-terminal.png" alt=""><figcaption></figcaption></figure>

If you can't find the terminal, please log in to your local computer terminal or use Putty for Windows via SSH.

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/cPanel/cpanel-ssh.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you can't find the terminal, please contact your hosting driver, as they manage the cPanel control.&#x20;
{% endhint %}

Once you've opened the terminal, navigate to the root folder of laravel project.

<div align="left"><figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FY0NgOz3o9c852lG8DCkk%2Fimage.png?alt=media&#x26;token=2dd48ea6-14f6-4969-bc08-b45c80ee1271" alt=""><figcaption></figcaption></figure></div>

<figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FISIDf3rKwlH3s34usgUE%2Fimage.png?alt=media&#x26;token=93f3afdf-8d5c-4d9a-9d47-834c0a3805eb" alt=""><figcaption></figcaption></figure>

**10. Install Required Dependencies:**

In the laravel subdomain folder (api.your-domain.com), run this command to install the required dependencies.

```html
 composer install 
```

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/cPanel/cpanel-terminal-composer.png" alt=""><figcaption></figcaption></figure>

**11. Run Taxido Installation Wizard:**

Once you open api.your-domain.com in your web browser, the Taxido installation wizard will appear.

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/vps/install-1.png" alt=""><figcaption></figcaption></figure>

Step 1: Before you proceed to the next step, make sure that the specified PHP extensions are installed on your system.

<figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FrsZLSkiYgPyyygYui3dY%2Fimage.png?alt=media&#x26;token=86353cb4-dde7-45e4-8ac1-d761d3c4d118" alt=""><figcaption></figcaption></figure>

Step 2: Once all the required PHP extensions are installed, proceed to the next step to check permissions for specific folders to ensure they are allowed.

If permissions are not allowed for the mentioned folders, please allowed folder permissions and proceed to the license verification step.

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/installer-3-1.png" alt=""><figcaption></figcaption></figure>

Step 3: Before using the Taxido API, it's important to verify your Envato purchase license code.

Enter in your Envato username and the Taxido purchase code and click next button.

If you don't know where to find your purchase code, click here: [Where Is My Purchase Code?](https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code)

{% hint style="warning" %}
**Note:** Once a license is verified, it can't be used for another project. An Envato Purchase License can only be verified on one domain at time.
{% endhint %}

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/vps/configuration.png" alt=""><figcaption></figcaption></figure>

&#x20;Step 4: Once the license has been verified, proceed to the database configuration step.

Enter the essential MySQL database credentials to connect the Laravel API to the MySQL database such as a database host, username, password, and database name.

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/vps/clipboard-image%20(1).png" alt=""><figcaption></figcaption></figure>

To import sample data, select "Import Dummy Data". After selecting this option, the administration details will be hidden. Click the "Next" button to the sample data will be imported.

If you prefer not to import sample data, you can deselect "Import Dummy Data" After that, enter the administration details. Once done, click the "Next" button to proceed.

{% hint style="warning" %}
**Note:** After entering the required information and clicking "Next," the database setup will start. It might take few minutes, so please wait patiently.
{% endhint %}

Step 5: Once all steps are finished, Congratulations! Taxido has been successfully installed and configured on your system! 🎉

**12. Test Your Live Application:**

Visit your website in a web browser to ensure everything is working correctly.

**References for deploying a Laravel project in cPanel**

Here are some references that can guide you through deploying a Laravel project on a cPanel server:

1. **Laravel Official Documentation:** It includes sections on deploying Laravel applications and provides insights into best practices.

   [Laravel Official Documentation - Deployment](https://laravel.com/docs/10.x/deployment)
2. **cPanel's Documentation:** Check for information related to hosting, databases, and other cPanel features.

   [cPanel Documentation](https://docs.cpanel.net/cpanel/)
3. **Host-Specific Guides:** Your hosting driver might have specific guides or documentation related to Laravel deployment.

### **Setup Cron Job**

Below is a step-by-step guide on how to set up a cron job in cPanel for running a Laravel command.

**1. Access cPanel**

Log in to your cPanel account using your credentials provided by your hosting driver.

**2. Navigate to the Cron Jobs Section**

<figure><img src="https://docs.pixelstrap.net/laravel/taxido/assets/images/laravelApi/cron-job-1.png" alt=""><figcaption></figcaption></figure>

1. In the cPanel dashboard, scroll down to the "Advanced" section.
2. Click on "Cron Jobs."

#### **3. Configure the Cron Job**

To configure the cron job to run your Laravel command, follow these steps:

<figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2Fpjuja3G5uunnpHWYd4dP%2Fimage.png?alt=media&#x26;token=f2c29627-08f4-4a2d-b69c-975b9eb89de3" alt=""><figcaption></figcaption></figure>

1. Select common settings which you want to run Laravel schedule command (e.g., every 5 minutes).
2. In the Command field, enter the path to Laravel's `artisan` file from the API subdomain's root directory (e.g., `api.your-domain.com/artisan`) and include the following command:\
   `schedule:run`
3. To enable notifications, you also need to set up the queue worker. Use the following command:\
   `queue:work --once`\
   This should be run from the same API subdomain root folder (`api.your-domain.com`).
4. Click to **Add New Cron Job** Button, then add new cron job in cPanel.

&#x20;

### **Default Credentials**

&#x20;  **Admin Credential:**

&#x20;    Url: <https://your-domain.com/admin/login>

&#x20;    Email: <admin@example.com>

&#x20;     Password: 123456789

&#x20;  **Driver Credential:**

&#x20;      Url: <https://your-domain.com/admin/login>

&#x20;      Email: <driver@example.com>

&#x20;       Password: driver\@123

&#x20;       **User Landing Page:** [**https://your-domain.com**](https://your-domain.com/)
