PHP code example of trianity / laravel-sqids

1. Go to this page and download the library: Download trianity/laravel-sqids 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/ */

    

trianity / laravel-sqids example snippets


use Trianity\Sqids\SqidsFactory;

class Foo
{
    protected $sqids;

    public function __construct(SqidsFactory $sqids)
    {
        $this->sqids = $sqids;
    }

    public function bar(array $id)s
    {
        $this->sqids->encode($ids);
    }
}

App::make('Foo')->bar();