Setup Laravel

Introduction

Chatvia is built with Laravel 10.* and pusher with developer friendly code. You can simply change the layouts and mode using this template. We have managed the chat with PUSHER APP with all details of chat, image, emojis and files.

Prerequisites

Please follow below steps to install and setup all prerequisites:

  • Server

    Make sure to have the Xampp/Wampp installed & running in your computer.

  • Composer

    Make sure to have the Composer installed & running in your computer.

  • Git

    Make sure to have the Git installed globally & running on your computer. If you already have installed git on your computer, you can skip this step.

  • Node

    Make sure to have the Node installed globally & running on your computer. If you already have installed Node on your computer, you can skip this step.

Installation

To setup the Chat App, follow below-mentioned steps:

  • Install Prerequisites

    Make sure to have all above prerequisites installed & running on your computer.

After you finished with the above steps, you can run the following commands to run the project locally or build for production use:

Command Description
npm install This would install all the required dependencies in the node_modules folder.
composer install command to install all of the framework's dependencies.

Please run the below command to generate the new APP_KEY.

php artisan key:generate

Please fill your DB credentials in the .env file.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=chatvia
DB_USERNAME=root
DB_PASSWORD=

Please fill your PUSHER APP credentials in the .env file.

PUSHER_APP_ID={ADD_YOUR_APP_ID}
PUSHER_APP_KEY={ADD_YOUR_APP_KEY}
PUSHER_APP_SECRET={ADD_YOUR_APP_SECRET}
PUSHER_APP_CLUSTER={ADD_YOUR_APP_CLUSTER}

Please fill your PUSHER APP KEY in the resouces/js/index.init.js file. You can create PUSHER APP KEY from this link https://pusher.com.

var pusher = new Pusher('{ADD_YOUR_PUSHER_APP_KEY}', { cluster: 'ap2', forceTLS: true });

Please run the following commands to clear all cache from the project.

php artisan optimize:clear
php artisan migrate:fresh This will migrate the database tables. For more details visit https://laravel.com/docs/10.x/migrations
php artisan db:seed This will insert the database tables data. For more details visit https://laravel.com/docs/10.x/seeding
npm run build This will generate css from scss and create fresh build for your project.
npm run build-rtl This will generate rtl css from css and create fresh rtl css for your project.
php artisan serve The development server is accessible at http://localhost:8000.
To run on other port just run command : php artisan serve --port=8001
Tips

Make sure to provide www-data user permissions to storage folder if you are using Linux server.

© Themesbrand.
Crafted with by Themesbrand