PHP code example of danielcosta / eloquent-uuid
1. Go to this page and download the library: Download danielcosta/eloquent-uuid 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/ */
danielcosta / eloquent-uuid example snippets
use DCST\Database\Eloquent\Models\UUIDEloquentModel;
class Product extends UUIDEloquentModel
{
// your class model
}
$product = new Product;
$product->name = 'My Awesome Product';
$product->save();
var_dump($product->id); // 55d53549-e772-4765-9467-5a75d33cbf6a