koel/app/Http/Controllers/API/FetchDemoCreditsController.php
2024-07-06 17:44:47 +02:00

19 lines
429 B
PHP

<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\File;
use Throwable;
class FetchDemoCreditsController extends Controller
{
public function __invoke()
{
try {
return response()->json(json_decode(File::get(resource_path('demo-credits.json')), true));
} catch (Throwable) {
return response()->json();
}
}
}