PHP code example of asseco-voice / laravel-blueprint-audit

1. Go to this page and download the library: Download asseco-voice/laravel-blueprint-audit 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/ */

    

asseco-voice / laravel-blueprint-audit example snippets


$this->timestamp('created_at')->nullable();
$this->string('created_by')->nullable();
$this->string('creator_type')->nullable();

$this->timestamp('updated_at')->nullable();
$this->string('updated_by')->nullable();
$this->string('updater_type')->nullable();

$this->timestamp('deleted_at')->nullable();
$this->string('deleted_by')->nullable();
$this->string('deleter_type')->nullable();

public function up()
{
    Schema::create('matches', function (Blueprint $table) {
        // ...
        // some fields
        // ...

        MigrationMethodPicker::pick($table, config('your-config.timestamps'));
    });
}

public function up()
{
    Schema::create('matches', function (Blueprint $table) {
        // ...
        // some fields
        // ...

        $table->timestamps();
        $table->softDeletes();
    });
}