PHP code example of navjobs / temporal-models

1. Go to this page and download the library: Download navjobs/temporal-models 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/ */

    

navjobs / temporal-models example snippets


$table->dateTime('valid_start');
$table->dateTime('valid_end')->nullable();

class Commission extends Model
{
    use Temporal;

    protected $dates = ['valid_start', 'valid_end'];
    protected $temporalParentColumn = 'representative_id';
}

protected $enableUpdates = true;