PHP code example of mahmoudkon / messenger

1. Go to this page and download the library: Download mahmoudkon/messenger library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mahmoudkon / messenger example snippets


    PUSHER_APP_ID=#########
    PUSHER_APP_KEY=#########
    PUSHER_APP_SECRET=#########

    ...
    use Illuminate\Foundation\Auth\User as Authenticatable;
    use Messenger\Chat\Traits\Messageable;

    class User extends Authenticatable
    {
        use Messageable;
    }

    php artisan vendor:publish --tag=messenger

    php artisan vendor:publish --tag=messenger-config
    php artisan vendor:publish --tag=messenger-migrations
    php artisan vendor:publish --tag=messenger-assets
    php artisan vendor:publish --tag=messenger-views

    php artisan migrate

    @vite(['resources/js/app.js'])
bash
    composer 
bash
    npm install --save-dev laravel-echo pusher-js