Just take a look at how hashing
default works.
There is no Illuminate\Hashing\HashServiceProvider
the following method
public function register()
{
$this->app->singleton('hash', function () { return new BcryptHasher; });
}
This means, by default, that you are using BcryptHasher
as an instance.
If you want to implement hash
on your own, you will have to create your own service provider ( Provider
) and façades ( Facades
) to hashing
and then swap the default implementations of the config/app.php
file.
More precisely, you'll want to swap in the array of providers
Illuminate\Hashing\HashServiceProvider::class
,
with your own service provider ( providers
), and the same goes for array
aliases
in the same file.
Then, as an example, take a look at how BcryptHasher
implements an interface, and your hash implementation must implement the same interface.
This would extend the hash
in Laravel.
Complementary Topics
Change the hash used for login to laravel 5.4
Adding Custom User Providers
Custom auth and hashing laravel 5.1
Creating a Hashing Manager For Our Custom Laravel Hashing
Implementations