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

timestamps management : created_at and updated_at #25

Closed
wants to merge 4 commits into from

Conversation

Nwenn
Copy link

@Nwenn Nwenn commented Oct 21, 2018

Respond to #23

@Flynsarmy
Copy link
Owner

What was the purpose behind removing the trim functionality?

@Nwenn
Copy link
Author

Nwenn commented Oct 22, 2018

Oups ! It's a mistake !!!

@Nwenn
Copy link
Author

Nwenn commented Oct 22, 2018

Oups ! It's a mistake !!!
Sorry, this is the first time I'm doing a pull request.

(sorry for my English)

@Flynsarmy
Copy link
Owner

One other minor change before I can merge: If created_at or updated_at columns already exist, don't overwrite them. Something like this:

                $new[$key] = $item;
                if ( !isset($new[$key]['created_at']) )
                    $new[$key]['created_at'] = \Carbon\Carbon::now();
                if ( !isset($new[$key]['updated_at']) )
                    $new[$key]['updated_at'] = \Carbon\Carbon::now();

Thoughts?

@Nwenn
Copy link
Author

Nwenn commented Oct 24, 2018 via email

@Flynsarmy
Copy link
Owner

Added in 92acae3

@Flynsarmy Flynsarmy closed this Mar 27, 2020
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