Based on this problem, I want to replicate it but my problem is that the array option has more than 3000 posibilities. If I do this:
Route::get('/example/{example}', 'ExampleController')
->where('example','(example-1|example-2|...|example-3999|example-4000)');
I get this error:
preg_match(): Compilation failed: regular expression is too large at offset 72980
Is there a way to use in_array()
or similar in the where condition of route
? With a custom where condition...
A lot of thanks!