<?php namespace Lio\ServiceProviders;

use Illuminate\Support\ServiceProvider;
use Hashids\Hashids;

class HashidsServiceProvider extends ServiceProvider
{
    public function boot()
    {
        $this->app->bind('Hashids\Hashids', function() {
            $key = $this->app['config']->get('app.key');
            return new Hashids($key, 2);
        });
    }

    public function register() {
        return ['hashids'];
    }
}

<?php namespace Lio\ServiceProviders;

use Illuminate\Support\ServiceProvider;
use Hashids\Hashids;

class HashidsServiceProvider extends ServiceProvider
{
    public function register() 
    {
        $this->app->bind(['Hashids\Hashids' => 'hashids'], function() {
            $key = $this->app['config']->get('app.key');
            return new Hashids($key, 2);
        });
    }
}

Move Hashids binding to register method & fix alias
Move Hashids binding to register method & fix alias

The `register()` method is more appropriate than `boot()` to register bindings with the container. This change also fixes the registration of the alias.