travisnguyen20 / laravel-message-hub
Message Hub For Laravel 5.*
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/travisnguyen20/laravel-message-hub
Requires
- php: >=7.1.3
- guzzlehttp/guzzle: ~6.0
- illuminate/support: 5.6.*
Requires (Dev)
- friendsofphp/php-cs-fixer: ^1.12
- fzaninotto/faker: ^1.6
- mockery/mockery: ^0.9.5
- phpunit/phpunit: ^5.5
- satooshi/php-coveralls: ^1.0
- sllh/php-cs-fixer-styleci-bridge: ^2.1
This package is auto-updated.
Last update: 2025-10-07 20:34:28 UTC
README
PHP package built for Laravel 5.* to push messages to message-hub.com
ABOUT
- Push message to message-hub
INSTALLATION
This project can be installed via Composer. To get the latest version of Laravel Message Hub, add the following line to the require block of your composer.json file:
{
"require": {
"travisnguyen20/laravel-message-hub": "1.*"
}
}
You'll then need to run composer install or composer update to download the
package and have the autoloader updated.
Or run the following command:
composer require travisnguyen20/laravel-message-hub
Add the Service Provider & Facade/Alias
Once Laravel Message Hub is installed, you need to register the service provider in config/app.php.
TravisNguyen\MessageHub\MessageHubServiceProvider::class,
You may add the following aliases to your config/app.php:
'MessageHub' => TravisNguyen\MessageHub\Facades\MessageHub::class,
Publish the package config file by running the following command:
php artisan vendor:publish --provider="TravisNguyen\MessageHub\MessageHubServiceProvider" --tag="config"
ERRORS
This package throws several exceptions. You are free to use try/catch
statements or to rely on the Laravel built-in exceptions handler.
InvalidAccessTokenException
The access token is not set, to prevent that go to config/message-hub.php and set api-token value
TokenExpiredException
Token expired, go to Message Hub to get new token
InvalidMessageException
Currently, title, source, content is required, make sure you set these props to prevent exception.
USAGE
Facade
The package offers a facade MessageHub::.
Customize
You can customize the package behaviour by overriding/overwriting the public methods and the attributes/properties. Dig into the source.
LICENSE
Laravel Message Hub is licensed under The MIT License (MIT).