PHP code example of lucasmichot / eloquentuuid
1. Go to this page and download the library: Download lucasmichot/eloquentuuid 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/ */
lucasmichot / eloquentuuid example snippets
use Lucasmichot\Eloquentuuid\UuidTrait;
class Post extends Eloquent
{
use UuidTrait;
// the code of your model comes here
}
$post = Post::find(1);
// update the attributes of the post
echo $post->uuid();