Devise\Models\Scaffolding\ScaffoldingManager::appendTimestamps PHP Метод

appendTimestamps() приватный Метод

Checks for timestamps key to determine if created_at and updated_at fields should be added to fields array
private appendTimestamps ( array &$input ) : void
$input array
Результат void
    private function appendTimestamps(&$input)
    {
        if (in_array('timestamps', array_keys($input))) {
            $timestampsArr = ['created_at', 'updated_at'];
            foreach ($timestampsArr as $timestamp) {
                $input['fields'][] = ['name' => $timestamp, 'type' => 'timestamp', 'default' => '0000-00-00 00:00:00', 'displayForm' => false];
            }
            unset($input['timestamps']);
        }
    }