dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.32k stars 1.25k forks source link

Route regular expression constraints #1751

Closed kevinklinegargar closed 3 years ago

kevinklinegargar commented 3 years ago

Hi, Dingo support Laravel route regular expression like in the stock Laravel ? I can't find in Dingo docs, does have a plan to integrate this ?

specialtactics commented 3 years ago

Hi, if you're talking about what I think you're talking about - ie;

Route::pattern('paramName', 'regexp');

Then yes it does, and in fact even that syntax is exactly the same as Laravel Routing, so just put that for example in the boot method of your route service provider, and it should work.