Like the title says: Is it possible to have a route parameter in the middle of a string in my route in Laravel 5.7?
My route is defined as so:
Route::get('/foos/foo-{bar}-baz', function () {
return 'something';
}
->where('bar', '*+'),
->middleware(['web', MyMiddleware::class]);
I am wanting to access this parameter in the MyMiddleware class but it always returns null, unless I define my route as '/foo/{bar}/baz'
I've tried a number of different regex combinations to no avail.