Add a Carbon helper function
This commit is contained in:
parent
4057abb7e7
commit
27904658c6
3 changed files with 9 additions and 4 deletions
|
@ -37,7 +37,7 @@ class NoteService
|
|||
);
|
||||
|
||||
if (array_key_exists('published', $data) && empty($data['published']) === false) {
|
||||
$carbon = new \Carbon\Carbon($data['published']);
|
||||
$carbon = carbon($data['published']);
|
||||
$note->created_at = $note->updated_at = $carbon->toDateTimeString();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue