1
我試圖將www.example.com/username更改爲username.example.com。我已經建立了Apache,現在我陷入了困境。在我的UserController中我得到了這一點,它的工作罰款www.example.com/username使用laravel的通配符子域名
if($validator->passes() && Auth::attempt($userdata)) {
return Redirect::to(Auth::user()->username)->with('flash_notice', 'You have logged in successfully');
}
現在,我得到這個在routes.php文件,但什麼都不做。感謝您的時間。
Route::group(array('domain' => '{account}.example.com'), function()
{
Route::get('{account}', function($account, $id)
{
$account = Input::get('username');
$id = Input::get('id');
});
});
還是什麼都沒有.. – phcm
什麼是「一無所有」是什麼意思?你期待它做什麼?你不會從這條路線輸出任何東西! –
嗯,我期待從登錄表單example.com登錄到username.example.com登錄 – phcm