PHP code example of pgs-soft / hashid-bundle
1. Go to this page and download the library: Download pgs-soft/hashid-bundle 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/ */
pgs-soft / hashid-bundle example snippets
use Pgs\HashIdBundle\Annotation\Hash;
class UserController extends Controller
{
/**
* @Hash("id")
*/
public function edit(int $id)
{
//...
}
/**
* Process multiple parameters - 'oneMore' will not be processed
* @Route(name="test", path="/test/{id}/{other}/{oneMore}")
* @Hash({"id","other"})
*/
public function test(int $id, int $other, int $oneMore)
{
//...
}
}