krgm.so-manager-dev.com/app/Support/Files.php
Your Name 71986a2df1
All checks were successful
Deploy preview (main_go) / deploy (push) Successful in 14s
feat: 实装SHJ-6/9/10バッチ処理システム
- SHJ-9: 日次売上集計処理
- SHJ-10: 年次月次売上集計処理
- SHJ-6: サーバ死活監視処理
- 各種モデルサービスコマンド追加
- earnings_summary, device, hardware_check_log, print_job_log テーブル用SQL追加
2025-08-22 19:44:06 +09:00

33 lines
616 B
PHP

<?php
namespace App\Support;
use Illuminate\Support\Facades\Storage;
/**
* ファイルユーティリティ
*/
class Files
{
/**
* 一時ファイルパス生成
*/
public static function tempPath(string $prefix = 'sm_', string $suffix = '.tmp'): string
{
$dir = sys_get_temp_dir();
return $dir.DIRECTORY_SEPARATOR.$prefix.uniqid('', true).$suffix;
}
/**
* ストレージに保存(簡易)
*/
public static function putPublic(string $path, string $contents): bool
{
return Storage::disk('public')->put($path, $contents);
}
}