PHP code example of esign / laravel-auto-timestamps

1. Go to this page and download the library: Download esign/laravel-auto-timestamps 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/ */

    

esign / laravel-auto-timestamps example snippets


$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->useCurrent()->useCurrentOnUpdate();

'connections' => [
    'mysql',
],

$table->autoTimestamps();

// results in:
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->useCurrentUpdate();

bash
php artisan vendor:publish --provider="Esign\AutoTimestamps\AutoTimestampsServiceProvider"