1. Go to this page and download the library: Download arnaldo-tomo/rotabonita 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/ */
// Transparently intercepts RouteMatched Event before Controller receives it
// Reverts: BYPWtH2qYos → 1
GET /posts/BYPWtH2qYos → Resolves exactly as if the user accessed /posts/1
public function getPublicIdAttribute()
{
return app(\Rotabonita\TokenGenerator::class)->encode($this);
}
// And add to your model: protected $appends = ['public_id'];