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)