Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created May 18, 2018 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/1810ed9e6a9c230474e974dc0acbbd32 to your computer and use it in GitHub Desktop.
Save uno-de-piera/1810ed9e6a9c230474e974dc0acbbd32 to your computer and use it in GitHub Desktop.
<?php
public function toArray($request)
{
return [
'name' => $this->name,
'email'=> $this->email,
"created_at" => Carbon::createFromFormat('Y-m-d H:i:s', $this->created_at)->format('d-m-Y'),
"dni" => $this->dni
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment