nathanmac/laravel-guid is a Laravel package for simple guid generator package for laravel 4.
It currently has 10 GitHub stars and 5.767 downloads on Packagist.
Install it with composer require nathanmac/laravel-guid.
Discover more Laravel packages by nathanmac
or browse all Laravel packages to compare alternatives.
Last updated
Simple GUID generator Package for Laravel 4
Begin by installing this package through Composer. Edit your project's composer.json file to require Nathanmac/laravel-guid.
"require": {
"nathanmac/laravel-guid": "dev-master"
}
Next, update Composer from the Terminal:
composer update
Once this operation completes, the final step is to add the service provider. Open app/config/app.php, and add a new item to the providers array.
'Nathanmac\GUID\GUIDServiceProvider'
echo "GUID: " . GUID::generate(); // GUID: 582B5733-8AE1-79D2-DB8F-5720ECBE4306
echo "GUID: " . GUID::generate('custom salt value'); // GUID: 582B5733-8AE1-79D2-DB8F-5720ECBE4306
echo "GUID: " . GUID::generate(false, true); // GUID: {582B5733-8AE1-79D2-DB8F-5720ECBE4306}