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

Support '/' as a possible column name. #45268

Merged
merged 1 commit into from Dec 12, 2022
Merged

Conversation

amanpatel
Copy link
Contributor

Escape '/' when checking for guard-able column.

This might not be a popular thing, but we have a dynamic app, where some of the postgres columns have a "/" character in them. If you have such a column, calling the fill() method on the model with such column name results in an warning such as this:

PHP Warning:  preg_grep(): Unknown modifier '_' in .../GuardsAttributes.php on line ...

I figure that if Postgres supports such columns, Laravel/Eloquent should support this too.

Escape '/' when checking for guard-able column.
@taylorotwell taylorotwell merged commit 662f1bd into laravel:9.x Dec 12, 2022
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.

None yet

2 participants