laravel子域名和主站同站

 1 Route::group(array('domain' => 'localhost'), function()
 2 {
 3     Route::get('/',function(){
 4         return 'localhost';
 5     });
 6 });
 7 Route::group(array('domain' => '127.0.0.1'), function()
 8 {
 9     Route::get('/',function(){
10         return '127.0.0.1';
11     });
12 });

 

posted @ 2015-09-06 14:10  刘满blog  阅读(415)  评论(0编辑  收藏  举报