PHP code example of ignition-nbs / laravel-uuid-model

1. Go to this page and download the library: Download ignition-nbs/laravel-uuid-model 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/ */

    

ignition-nbs / laravel-uuid-model example snippets




namespace App;

use IgnitionNbs\LaravelUuidModel\UuidModel;
use Illuminate\Database\Eloquent\Model;

class MyModel extends Model
{
	use UuidModel;
}

class CreateMyModelsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('my_models', function (Blueprint $table) {
            $table->uuid('id')->primary();
        });
    }
}