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 custom column name for some methods #19234

Closed
wants to merge 2 commits into from
Closed

Conversation

meness
Copy link
Contributor

@meness meness commented May 16, 2017

Hi,

Changing the default deleted_at, created_at, and updated_at column names is possible by creating new constants called DELETED_AT, CREATED_AT, and UPDATED_AT.

$table->softDeletes(); // creates 'deleted_at' column

$table->softDeletes('left_at'); // creates 'left_at' column

Affected methods: softDeletesTz(), timestampsTz(), timestamps(), dropSoftDeletes(), dropTimestamps()

meness added 2 commits May 16, 2017 18:18
Methods: softDeletesTz(), timestampsTz(), timestamps(), dropSoftDeletes(), dropTimestamps()
@taylorotwell
Copy link
Member

I dunno. I don't want to go overboard with this stuff. You can just call the methods you need directly.

@meness
Copy link
Contributor Author

meness commented May 16, 2017

@taylorotwell You already merged #19203. This PR exactly does what #19203 does. You made helper functions but you forced users to use them only if they have exact deleted_at column, is this right?!

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