PHP code example of labrodev / laravel-uuidable

1. Go to this page and download the library: Download labrodev/laravel-uuidable 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/ */

    

labrodev / laravel-uuidable example snippets

 



namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Labrodev\Uuidable\ModelHasUuid;

class ExampleModel extends Model
{
    use ModelHasUuid;
}

$table->uuid('uuid');
 
/**
* @return string
*/
protected function fetchUuidColumn(): string
{
    return 'your-uuid-column-name';
}
bash
composer analyse