PHP Classes

File: delete-expired-refresh-tokens.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   Simple PHP API Framework   delete-expired-refresh-tokens.php   Download  
File: delete-expired-refresh-tokens.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple PHP API Framework
Create new APIs using controller classes
Author: By
Last change:
Date: 4 months ago
Size: 397 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

require
__DIR__ . "/vendor/autoload.php";

$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();

$database = new Database(
   
$_ENV["DB_HOST"],
   
$_ENV["DB_NAME"],
   
$_ENV["DB_USER"],
   
$_ENV["DB_PASS"]
);

$refresh_token_gateway = new RefreshTokenGateway($database, $_ENV["SECRET_KEY"]);

echo
$refresh_token_gateway->deleteExpired(), "\n";