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

notice if dots have been used in the view name #457

Merged
merged 3 commits into from
Jun 30, 2022
Merged

notice if dots have been used in the view name #457

merged 3 commits into from
Jun 30, 2022

Conversation

muhammadmp97
Copy link
Contributor

@muhammadmp97 muhammadmp97 commented Jun 30, 2022

View directory names should not contain the . character.
https://laravel.com/docs/9.x/views#nested-view-directories

Today I got this message because I had used a name like foo.bar.blade.php for my view file:

View [foo.bar] not found.
Did you mean foo.bar?

It's funny and confusing, not clear and helping!

This happens because Laravel replaces the dots with slashes so it thinks that we want this file:

views
    foo
        bar.{extension}

The solution description is pretty deceptive, so I have fixed that by adding a condition that you can see it in my commit. This is the new solution description when anyone makes that mistake:

View names should not contain the . character.

@freekmurze freekmurze merged commit 6acd82e into facade:main Jun 30, 2022
@freekmurze
Copy link
Collaborator

Thanks!

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.

2 participants