koel/app/Http/Controllers/API/FetchDemoCreditController.php
2024-01-02 13:07:37 +01:00

18 lines
399 B
PHP

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