PHP code example of marehman / laravel-messenger

1. Go to this page and download the library: Download marehman/laravel-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/ */

    

marehman / laravel-messenger example snippets

 artisan vendor:publish --tag=messenger-<asset-name>
 artisan messenger:publish

php artisan breeze:install


php artisan migrate

npm install

npm run dev

php artisan messenger:install

php artisan migrate
config/messenger.php
config/messenger.php
app/Services/MessengerUserResolver.php



namespace App\Services;

use mar\messenger\Contracts\UserResolver;

class MessengerUserResolver implements UserResolver
{
    public function getUsers()
    {
        return \App\Models\User::all();
    }
}
composer.json file

composer.json


{
    "scripts": {
        "post-update-cmd": [
            "@php artisan messenger:publish --ansi"
        ]
    }
}