1. Go to this page and download the library: Download amrachraf6699/datify library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
amrachraf6699 / datify example snippets
use Datify\Concerns\HasDatifyTimestamps;
class Model extends \Illuminate\Database\Eloquent\Model
{
use HasDatifyTimestamps;
}
return [
// Turn on extra accessors:
'to_human' => true,
'to_short_human' => true,
'to_iso_8601' => true,
'to_date_time' => true,
// Custom naming (created_at.pretty, updated_at.pretty, etc.)
'suffix' => '.{format}',
// Custom format string (used when selecting 'custom')
'custom' => 'd/m/Y H:i',
// Default display for base attributes
'defaults' => [
'created_at' => 'to_human',
'updated_at' => 'custom',
],
];