• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

launcher-host/mercurius: Real-time Messenger for Laravel

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

launcher-host/mercurius

开源软件地址(OpenSource Url):

https://github.com/launcher-host/mercurius

开源编程语言(OpenSource Language):

PHP 35.7%

开源软件介绍(OpenSource Introduction):

Build Status Build Status Latest Version Total Downloads License

Table of Contents

About

Mercurius is a real-time messenger system using Laravel and Vue.js, featuring a complete application that you can easily install with any Laravel project.

Preview


Features

  • Real-time Messenger
  • Responsive
  • Multilingual
  • Browser notifications
  • Unique UX, with dark theme
  • Typing indicator
  • Remove conversations and messages
  • Search recipients with auto-complete

Screenshots

Click thumbs to enlarge image

Demo

You can try a demo of Mercurius. Authenticate using any of the following credentials:

Password: password

Tip: Open 2 different browsers and login with different usernames, so you can test send/receiving messages.


Installation

Make sure Laravel 5.6+ is installed before proceed.

1. Setup Pusher

If you don't have an account, create a free one on pusher.com website. Go to the dashboard, create a new app and take note of the API credentials.

Now, let's add the API keys to the .env file. Also, change the BROADCAST_DRIVER to pusher (default is log).

...
BROADCAST_DRIVER=pusher
...
PUSHER_APP_ID="xxxxxx"
PUSHER_APP_KEY="xxxxxxxxxxxxxxxxxxxx"
PUSHER_APP_SECRET="xxxxxxxxxxxxxxxxxxxx"
PUSHER_APP_CLUSTER="xx"
2. Register BroadcastServiceProvider

Open config/app.php and uncomment the line App\Providers\BroadcastServiceProvider::class,.

3. Laravel Authentication

Skip this step if authentication is already setup, otherwise type:

php artisan make:auth
4. Install Mercurius
composer require launcher/mercurius
5. Configuration (optional)

If you want to change the default configuration, publish the config file, by typing the command:

php artisan vendor:publish --tag=mercurius-config

For editing the config, open /config/mercurius.php and add your own values.

return [

    /*
    |--------------------------------------------------------------------------
    | Mercurius Models
    |--------------------------------------------------------------------------
    |
    | Defines the models used with Mercurius, use it to extend Mercurius and
    | create your own implementation.
    |
    */

    'models' => [
        'user' => App\User::class,
        'messages' => Launcher\Mercurius\Models\Message::class,
    ],

    /*
    |--------------------------------------------------------------------------
    | User Table Fields
    |--------------------------------------------------------------------------
    |
    | You can specify the column names for the user table. The `name` accepts
    | an array of fields, for building custom names with multiple columns.
    |
    */

    'fields' => [
        // 'name'   => ['first_name', 'last_name'],
        'name'   => 'name',
        'slug'   => 'slug',
        'avatar' => 'avatar',
    ],
];
6. Install Mercurius
php artisan mercurius:install
composer dump-autoload
7. User trait

Add Launcher\Mercurius\MercuriusUser trait to your User model:

// ...
use Illuminate\Foundation\Auth\User as Authenticatable;
use Launcher\Mercurius\MercuriusUser;

class User extends Authenticatable
{
    use MercuriusUser;
    // ...
}
8. Install dummy data (for testing)
php artisan db:seed --class=MercuriusDatabaseSeeder

Will add Messages and Users to the system, like in the demo example:

Demo Users:

Password: password

Update Mercurius

Whenever you update Mercurius, make sure to publish assets to apply the new versions of CSS/JS.

php artisan vendor:publish --tag=mercurius-public --force

Customization

Please see Customization for more information.


Roadmap

Check the roadmap for more information.

  • Unit Tests
  • Conversation w/ multiple users #13
  • Webhooks #16
  • Upload photos & files #14
  • Preview images and videos #15
  • Emoji support #18
  • Video Chat #19
  • Support socket.io #20
  • Search messages #17

Support


Contributing

Please see CONTRIBUTING for more information.


Changelog

We keep a CHANGELOG with the information that has changed.


Credits


Copyright and license

Copyright 2018 Bruno Torrinha. Mercurius is released under the MIT License.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap