ronaldcastillo / imap-authentication
此包最新版本(dev-master)没有可用的许可信息。
dev-master
2014-07-30 12:53 UTC
Requires
- php: >=5.3.2
- illuminate/auth: 4.1.*
- illuminate/session: 4.1.*
Suggests
- ext-imap: Allows the use of this library in production environments
This package is auto-updated.
Last update: 2024-09-18 10:28:55 UTC
README
为Laravel 4框架提供IMAP身份验证提供者
安装
将以下行添加到您的composer.json文件中
"require": {
"ronaldcastillo/imap-authentication": "dev-master"
}
现在,从您的项目的根目录的命令行运行composer update
composer update
注册包
将以下服务提供者添加到app/config/app.php
中的提供者数组中
'providers' => array( 'RonaldCastillo\Imap\ImapServiceProvider' )
更新Laravel的身份验证驱动配置
在app/config/auth.php
中将驱动更改为'imap'
'driver' => 'imap',
发布配置文件
从您的项目的根目录在命令行中运行以下命令
php artisan config:publish ronaldcastillo/imap-authentication
这将发布必要的配置到app/config/ronaldcastillo/imap-authentication/
。
在配置文件中我们有两个选项
return array( 'identifier' => 'username', 'datasource' => '{localhost:143}/readonly' );
identifier
指示用作身份验证用户名的字段名称,而datasource
的值如PHP手册中imap_open()函数中所述。