Created
April 4, 2014 11:15
-
-
Save localdisk/9972496 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| アプリケーションルート | |
|-------------------------------------------------------------------------- | |
| | |
| このファイルでアプリケーションの全ルートを定義します。 | |
| 方法は簡単です。対応するURIをLaravelに指定してください。 | |
| そしてそのURIに対応する実行コードをクロージャーで指定します。 | |
| | |
*/ | |
Route::get('/', function() | |
{ | |
echo Request::url(); | |
}); | |
Route::get('user/{username?}/{familyname?}', function($username = null, $familyname = null) | |
{ | |
$username = is_null($username) ? 'default' : $username; | |
echo $username . '/' . $familyname; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment