1. Go to this page and download the library: Download sebk/small-swoft-auth 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/ */
sebk / small-swoft-auth example snippets
use Sebk\SmallSwoftAuth\Interfaces\UserModelInterface;
class User extends Model implements UserModelInterface
{
/**
* Check user password
* @param string $password
* @return bool
*/
public function checkPassword(string $password)
{
return $this->getPassword() == md5($password);
}
}