1
我有问题。 我的路线是Laravel子域路由和控制器参数
Route::group(['domain' => '{account}.'.$domain], function() {
Route::get('/confirmmail/{hash}', 'Auth\[email protected]');
});
而且我的控制方法是
public function confirmEmail($domain, $hash)
{
$user = User::where('confirm_token', $hash)->firstOrFail();
$affectedRows = $user->update(array('active' => 1));
if ($affectedRows) {
Auth::login($user);
return Redirect::to('http://'.$user->workshop->slug.'.'.config('app.domain'));
} else {
echo "nie";
}
}
在我的方法,我必须使用两个parametrs $域和$哈希,我如何必须改变路线,有
function confirmEmail($hash)