PHP code example of rs / laravel-version-control
1. Go to this page and download the library: Download rs/laravel-version-control 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/ */
rs / laravel-version-control example snippets
use Redsnapper\LaravelVersionControl\Database\Blueprint;
use Redsnapper\LaravelVersionControl\Database\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$this->makeVcTables("users",function(Blueprint $table){
$table->string('email')->unique();
$table->string('password');
},function(Blueprint $table){
$table->string('email');
$table->string('password');
});
}
}
use Redsnapper\LaravelVersionControl\Models\BaseModel;
class Post extends BaseModel
{
}
$model->versions();
$model->anonymize(['email'=>'[email protected]']);