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 softDeletes() #19203

Merged
merged 1 commit into from
May 15, 2017
Merged

Support custom column name for softDeletes() #19203

merged 1 commit into from
May 15, 2017

Conversation

meness
Copy link
Contributor

@meness meness commented May 15, 2017

Hi,

Changing the default deleted_at column name is possible by creating a new constant called DELETED_AT.

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

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

@taylorotwell taylorotwell merged commit d394341 into laravel:5.4 May 15, 2017
@stefensuhat
Copy link

can we specify specific column name for softdeletes at model?

@meness
Copy link
Contributor Author

meness commented May 31, 2017

@stefensuhat Define const DELETED_AT = 'column_name'; in your model.

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