Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Support route parameters in Statamic routes with closures #9953

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

arthurperton
Copy link
Contributor

A little addition to #9868 in response to the comments. Route parameters are passed to the closure now:

Route::statamic('uri/{baz}', 'view', function ($baz) {
    $bar = gatherDataExpensively($baz);

    return ['foo' => $bar];
});

@arthurperton arthurperton changed the title Support route parameters in Statamic routes with closures [4.x] Support route parameters in Statamic routes with closures Apr 24, 2024
@jasonvarga jasonvarga merged commit 5452548 into statamic:4.x Apr 24, 2024
19 of 20 checks passed
@arthurperton arthurperton deleted the pr/route-closure-parameters branch December 19, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants