PHP code example of hoangphamdev / laravel-bitemporal
1. Go to this page and download the library: Download hoangphamdev/laravel-bitemporal 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/ */
hoangphamdev / laravel-bitemporal example snippets
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Schema::create('posts', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->timestamps();
$table->bitemporal();
});
Schema::table('posts', function (Blueprint $table) {
$table->dropBitemporal();
});
use Illuminate\Database\Eloquent\Model;
use HoangPhamDev\Bitemporal\Traits\HasBitemporal;
class Post extends Model
{
use HasBitemporal;
}