samedi 29 juillet 2017

php laravel route::pattern() issue

I have the same issue as this guy:

Laravel route not matching pattern

Here's my offending pattern:

Route::pattern('uuId', '/^\{?[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\}?$/i');

If I comment this line out, my request works great, so I'm positive it's related to this pattern. Like the linked to OP, I can confirm my regex is good:

http://ift.tt/2hctpZL

The issue here is probably that I don't know regex well, I'm usually one to just google if I need something specific where regex is concerned.

I removed the opening slash and it didn't work, removed the opening and ending slash and that too also didn't work. I'm sure it's my understanding of regex here that is the issue, but no matter how I play around with it I can't seem to get it work.

If anyone knows how to make that pattern work in Laravel for me, that would sure be great. Thanks!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2u8anVw
via IFTTT

Aucun commentaire:

Enregistrer un commentaire