2022-08-04 08:34:13 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
|
|
|
|
use App\Http\Controllers\Controller;
|
2024-01-04 21:51:32 +00:00
|
|
|
use Illuminate\Support\Facades\File;
|
2022-08-04 08:34:13 +00:00
|
|
|
use Throwable;
|
|
|
|
|
2024-02-28 04:37:27 +00:00
|
|
|
class FetchDemoCreditsController extends Controller
|
2022-08-04 08:34:13 +00:00
|
|
|
{
|
2024-01-02 12:07:37 +00:00
|
|
|
public function __invoke()
|
2022-08-04 08:34:13 +00:00
|
|
|
{
|
|
|
|
try {
|
2024-01-04 21:51:32 +00:00
|
|
|
return response()->json(json_decode(File::get(resource_path('demo-credits.json')), true));
|
2022-08-04 08:34:13 +00:00
|
|
|
} catch (Throwable) {
|
2024-01-02 12:07:37 +00:00
|
|
|
return response()->json();
|
2022-08-04 08:34:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|