我想問你如何使用ollieread在laravel中進行多認證登錄?這是我在auth.php登錄Multiauth在Laravel
'multi' => array(
'account' => array(
'driver' => 'eloquent',
'model' => 'users'
),
'user' => array(
'driver' => 'database',
'table' => 'admin'
)
),
'reminder' => array(
'email' => 'emails.auth.reminder',
'table' => 'password_reminders',
'expire' => 60,
),
然後代碼,這是我的控制器
function login() {
$attributes = \Input::get();
\Auth::account()->attempt(array(
'email' => $attributes['email'],
'password' => $attributes['password'],
));
\Auth::user()->attempt(array(
'email' => $attributes['email'],
'password' => $attributes['password'],
));
\Auth::account()->check();
\Auth::user()->check();
return \View::make('superAdmin.login');
}
public function authenticateAs($type, $user) {
$this->app['auth']->$type()->setUser($user);
}
}
我不明白它是如何定義$attributes
。當我運行我的代碼,結果是
「缺少參數1照亮\驗證\ AuthManager :: createDriver(),稱爲 Ç :\ XAMPP \ htdocs中\ laravelrental \供應商\ laravel \框架\ src \照亮\ Support \ Manager.php 行88並定義「。
那麼我如何解決這個問題呢?
我已經使用..但仍然不能 – user3796075 2014-09-25 08:02:59
當您不刪除'Illuminate \ Auth \ AuthServiceProvider''提供程序(再次閱讀[安裝指南](https://github.com/ollieread)/multiauth#安裝)) – 2014-09-25 08:15:27