Created
March 20, 2017 13:17
-
-
Save imliam/5a0335b5d227db6f8fb9e2da2e2d8594 to your computer and use it in GitHub Desktop.
Laravel 5 - Route must start with @
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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Laravel 5 - Route must start with @ | |
|-------------------------------------------------------------------------- | |
| | |
| A quick snippet showing use of the Route::where(); method that lets you | |
| define a regex pattern for the route to match, such as the "@" symbol | |
| at the beginning to denote a user. | |
| | |
*/ | |
Route::get('/users/{user}', 'UserController@index')->where('user', '^@.*'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment