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] Implied Statamic route views #9436

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Conversation

jasonvarga
Copy link
Member

@jasonvarga jasonvarga commented Jan 31, 2024

When making simple routes like this:

Route::statamic('login', 'login');

It's a little redundant when the view is the same as the URI. This PR makes the view optional and fall back to use the URI as the view.

Route::statamic('my-page'); // Implies 'my-page'
Route::statamic('/my-page'); // Implies 'my-page'
Route::statamic('/foo/bar'); // Implies 'foo.bar'

@jasonvarga jasonvarga merged commit bffeedd into 4.x Jan 31, 2024
36 checks passed
@jasonvarga jasonvarga deleted the implied-statamic-route-views branch January 31, 2024 21:05
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.

1 participant