Created
October 27, 2015 16:27
-
-
Save tpavlek/3708a8ff1d908bd511af to your computer and use it in GitHub Desktop.
Multiple laravel routes with same signature, different constraints
This file contains hidden or 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
get('persons/{id}', function ($id) { | |
dd("string name"); | |
})->name('test1'); | |
get('persons/{id}', function ($id) { | |
dd("matching numeric ID"); | |
})->name('test2')->where('id', '^[0-9,]+\d$'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment