22 lines
379 B
PHP
22 lines
379 B
PHP
<?php
|
|
|
|
namespace App\Utilities;
|
|
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
class Lastcall
|
|
{
|
|
public static function load($file)
|
|
{
|
|
$lastcall = (int) Storage::disk('local')->get($file);
|
|
|
|
if ($lastcall < time() - 30) {
|
|
$lastcall = time() - 30;
|
|
}
|
|
|
|
Storage::disk('local')->put($file, time());
|
|
|
|
return trim($lastcall);
|
|
}
|
|
}
|