1. Go to this page and download the library: Download stumason/claudavel 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/ */
use App\Models\Traits\HasUid;
class User extends Model
{
use HasUid;
}
$user->uid; // "K4x9Pq" instead of "1"
User::findByUid('K4x9Pq'); // Works
Route::get('/users/{user}', ...); // Binds automatically