1. Go to this page and download the library: Download uthman/hashid 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/ */
uthman / hashid example snippets
// Get Hash ID
$user = \App\User::first();
$user->hashed_id; //x7LR5oQJleJX60yPpNWV
'key' => env('APP_KEY'),
use Illuminate\Database\Eloquent\Model;
use Erashdan\Hashid\Traits\Hashid;
class Post extends Model
{
use Hashid;