1. Go to this page and download the library: Download zhylon/zhylonid-service 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/ */
zhylon / zhylonid-service example snippets
use Zhylon\ZhylonIdService\Contracts\ZhylonIdServiceContract;
class RegisterController extends Controller
{
public function __construct(
private readonly ZhylonIdServiceContract $zhylonId,
) {}
public function store(Request $request)
{
if ($this->zhylonId->userExists($request->string('email'))) {
return redirect()->route('login')->with('status', __('auth.zhylon_account_exists'));
}
// ... continue with your app's own registration flow (Fortify, Breeze, etc.)
}
}
use Zhylon\ZhylonIdService\Facades\ZhylonIdService;
if (ZhylonIdService::userExists($email)) {
// ...
}