syntaxlexx / laravel-5-messenger Goto Github PK
View Code? Open in Web Editor NEWA Simple Laravel 5, 6, 7, 8, 9, 10 & 11 Messenger with Pusher Capabilities
Home Page: https://messenger-inertia.acelords.com/
License: MIT License
A Simple Laravel 5, 6, 7, 8, 9, 10 & 11 Messenger with Pusher Capabilities
Home Page: https://messenger-inertia.acelords.com/
License: MIT License
Hello!
First of all, I would like to thank you for this package. I am trying to integrate Pusher but is seems like I can not figure out how to properly do it. Right now, I receive inputs into the database and I show them in the development server but I am not able to dinamically use it with Pusher.
Could you please, provide me with some futher explanations? Find below the config/pusher files and others:
config/chatmessenger.php
<?php
return [
'user_model' => App\User::class,
'message_model' => App\Models\Message::class,
'participant_model' => App\Models\Participant::class,
'thread_model' => App\Models\Thread::class,
/**
* Define custom database table names - without prefixes.
*/
'messages_table' => 'messages',
'participants_table' => 'participants',
'threads_table' => 'threads',
/**
* Define custom database table names - without prefixes.
*/
'use_pusher' => true,
];
config/app.php
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
'name' => env('APP_NAME', 'Laravel'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services your application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
/*
* Package Service Providers...
*/
Pusher\Laravel\PusherServiceProvider::class,
Lexx\ChatMessenger\ChatMessengerServiceProvider::class,
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Pusher' => Pusher\Laravel\Facades\Pusher::class,
],
];
The connections are included in config/pusher but nothing is sent to the pusher area or at least I don't see in the Pusher dashboard any connection.
thank you in advance!
hi ,
i want to override the fillables to add new attributes
So when a participant "stars" a thread, all the others will see that thread as starred?
Is it what you are expecting?
Perhaps the starred property could be in the participant table so that each participant will see his own starred threads.
I think this makes more sense
in this awesome package can we send individual message to user?
I wonder if it is possible to use two distinct tables of users.
Hello there. Even if the user leaves the chat, the new user will be notified when the new message is written. How do I get past that?
Hello , thank you for awesome package
i'm using this package for chat messenger , private chat is working fine
now i have to create group chat, where i user can create group , group messaging, add & remove users from group
here , not so much described about group messaging
please help me
The participantsString() method query users table directly without respect to user model. I use Sentinel/Sentry for auth and users table does not have 'name' column so participantsString() fails. On the other hand my User model have getter for 'name' property so the participantsString() can get user names if work with the proper User model.
Hi is there any way I can override the getMessagesAttribute to group the messages by date?
I'm using your package for chat in LARAVEL 6.
Now I want to extend the functionality of this package by allowing the upload of attachments, one message can have multiple attachments. To achieve this I need to override your Message Model so I can define the relationships to the attachment model.
How can I do that without editing the vendor file?
How would I integrate Pusher on Laravel 5.6? The docs are a little confusing on pusher.
I uncommented broadcast in config app and installed package. Everything works great but I don't see any data on the pusher dashboard.
I had to edit the models to get it to work for me correctly I was wondering how can I move the files into my proect without requiring it as a vendor so i can make more modifications? if possible im wanting to fork it and extend it to be more modular
https://messenger.acelords.com/ is not working.
When I send a message to the other person, he receives the new message as get to his console. However, the message does not appear in the view until the page is refreshed. What is the reason?
Hello, and thanks for this awesome package !
I would like to create a messenger application where the Authentified user can only create one thread by user (like Messenger)
For example, If a discussion between user_1 and user_2 exist, user_2 is not listed in the create thread page.
How can I do this ?
Thank you ! :)
Hi Lex,
I renamed the name column in the Users table to nick. The problem was solved when I updated the thread.php file from the localhostta vendors / lex group, but I can't make the necessary changes to the vendors folder because I have uplkoad with laravel forge. And so I get the name column not found error. How can I solve this problem?
Hi,
I was testing your package. Is is correct that you only get a notification that there is a new messages and that the conversation isn't updated, so you have a realtime chat?
Kind regards,
Erwin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.