| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Symfony bundle for encoding integer route parameters and decoding request parameters with http://www.hashids.org/
Please use this version with Symfony ≥5.0
Replace predictable integer url parameters in easy way:
Pros:
composer require pgs-soft/hashid-bundle # config/packages/pgs_hash_id.yaml
pgs_hash_id:
converter:
hashids:
salt: 'my super salt'
min_hash_length: 20
alphabet: 'qwertyasdzxc098765-'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)
{
//...
}
}You can also check our DemoController.
Bug reports and pull requests are welcome on GitHub at https://github.com/PGSSoft/HashId.
The project maintained by software development agency PGS Software. See our other open-source projects or contact us to develop your product.
| Back | FazBrowse Home | New Git URL |