AddChat can be installed via composer. Smooth... 🍻
{info.fa-youtube} A complete video tutorial guide for getting started quickly is Coming Soon
config/database.php
'strict' => false
If installing AddChat on an existing Laravel application and you already have Auth system then skip this step
If installing on a Fresh Laravel application then run
For Laravel 5.5 to 5.8
php artisan make:auth
php artisan migrate
For Laravel 6.x
composer require laravel/ui --dev
php artisan ui vue --auth
npm install && npm run dev
php artisan migrate
Unzip the addchat-laravel-pro.zip
file, copy the addchat-laravel-pro
folder and place it in your Laravel application root directory.
{warning} The folder name must be
addchat-laravel-pro
in your Laravel website directory.
Open your Laravel application composer.json
file and paste the below code in the end (right before last curly }
bracket)
"repositories": [{
"type": "path",
"url": "addchat-laravel-pro/"
}]
(once you complete, the composer.json
file will look something like this)
{
.
.
.
.
.
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"repositories": [{
"type": "path",
"url": "addchat-laravel-pro/"
}]
}
Install AddChat Laravel Pro via Composer
composer require classiebit/addchat-laravel-pro
Run AddChat install command
php artisan addchat:install
While installation, it will ask you for the license code. Enter the license code to complete the installation process.
{info} Remember, one license code is valid for one domain only. Contact support for more details.
Open the common layout file, mostly the common layout file is the file which contains the HTML & BODY tags.
Copy AddChat CSS code and paste it right before closing </head> tag
<!-- 1. Addchat css -->
<link href="<?php echo asset('assets/addchat/css/addchat.min.css') ?>" rel="stylesheet">
Copy AddChat Widget code and paste it right after opening <body> tag
<!-- 2. AddChat widget -->
<div id="addchat_app"
data-baseurl="<?php echo url('') ?>"
data-csrfname="<?php echo 'X-CSRF-Token' ?>"
data-csrftoken="<?php echo csrf_token() ?>"
></div>
Copy AddChat JS code and paste it right before closing </body> tag
<!-- 3. AddChat JS -->
<!-- Modern browsers -->
<script type="module" src="<?php echo asset('assets/addchat/js/addchat.min.js') ?>"></script>
<!-- Fallback support for Older browsers -->
<script nomodule src="<?php echo asset('assets/addchat/js/addchat-legacy.min.js') ?>"></script>
{warning} Please replace <php ?> tag by {{}} curly brackets.
<head>
<!-- **** your site other content **** -->
<!-- 1. Addchat css -->
<link href="<?php echo asset('assets/addchat/css/addchat.min.css') ?>" rel="stylesheet">
</head>
<body>
<!-- 2. AddChat widget -->
<div id="addchat_app"
data-baseurl="<?php echo url('') ?>"
data-csrfname="<?php echo 'X-CSRF-Token' ?>"
data-csrftoken="<?php echo csrf_token() ?>"
></div>
<!-- **** your site other content **** -->
<!-- 3. AddChat JS -->
<!-- 3. AddChat JS -->
<!-- Modern browsers -->
<script type="module" src="<?php echo asset('assets/addchat/js/addchat.min.js') ?>"></script>
<!-- Fallback support for Older browsers -->
<script nomodule src="<?php echo asset('assets/addchat/js/addchat-legacy.min.js') ?>"></script>
</body>
{info} For Info, the
php artisan addchat:install
publishes AddChat assets to your applicationpublic/assets
directory
{info}
addchat.min.js
for modern browsers &addchat-legacy.min.js
for older browsers. These will be used switched by the browsers automatically on the basis ontype="module"
&nomodule
, you need to nothing.
{success} Setup finishes here, now heads-up straight to Settings docs