eyoll/laravel-free-mobile-notification-sender

Laravel 对 FreemobileNotificationSender 的封装

1.0.1 2015-06-28 17:55 UTC

This package is auto-updated.

Last update: 2024-08-29 04:04:23 UTC


README

SensioLabsInsight

本包是 FreemobileNotificationSender(https://github.com/tibounise/FreemobileNotificationSender)的 Laravel 封装

安装

首先通过 Composer 安装包。编辑您的项目 composer.json 文件,添加 aeyoll/laravel-free-mobile-notification-sender 作为依赖。

"require": {
  "aeyoll/laravel-free-mobile-notification-sender": "1.*"
}

接下来,使用 Composer 在终端更新您的项目

php composer.phar update

安装包后,您需要添加服务提供者。打开您的 app/config/app.php 配置文件,并在 providers 数组中添加一个新项。

'Aeyoll\LaravelFreeMobileNotificationSender\LaravelFreeMobileNotificationSenderServiceProvider'

执行此操作后,您还需要添加一个别名。在您的 app/config/app.php 文件中,将以下内容添加到 aliases 数组。

'LaravelFreeMobileNotificationSender' => 'Aeyoll\LaravelFreeMobileNotificationSender\LaravelFreeMobileNotificationSender'

然后,您需要发布包配置

php artisan config:publish aeyoll/laravel-free-mobile-notification-sender

最后,在 app/config/packages/aeyoll/laravel-free-mobile-notification-sender/config.php 文件中添加您在 mobile.free.fr 用户资料中的 useridapikey

使用方法

完成所有步骤并安装完成后,您可以使用 LaravelFreeMobileNotificationSender

发送消息

您可以通过以下方式简单发送一条消息

LaravelFreeMobileNotificationSender::sendMessage('Hello world!');