chore: init saasshop repo + sql migrations runner + gitee go
This commit is contained in:
34
app/Http/Controllers/Api/V1/SystemController.php
Normal file
34
app/Http/Controllers/Api/V1/SystemController.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
class SystemController extends Controller
|
||||
{
|
||||
public function ping(): JsonResponse
|
||||
{
|
||||
return response()->json([
|
||||
'ok' => true,
|
||||
'message' => 'SaaSShop API is alive',
|
||||
'time' => now()->toDateTimeString(),
|
||||
'version' => 'v1',
|
||||
]);
|
||||
}
|
||||
|
||||
public function platforms(): JsonResponse
|
||||
{
|
||||
return response()->json([
|
||||
'ok' => true,
|
||||
'platforms' => [
|
||||
['key' => 'pc', 'name' => 'PC 端', 'status' => 'ready'],
|
||||
['key' => 'h5', 'name' => 'H5', 'status' => 'ready'],
|
||||
['key' => 'wechat_mp', 'name' => '微信公众号', 'status' => 'reserved'],
|
||||
['key' => 'wechat_mini', 'name' => '微信小程序', 'status' => 'reserved'],
|
||||
['key' => 'app', 'name' => 'APP', 'status' => 'reserved'],
|
||||
],
|
||||
'api_prefix' => '/api/v1',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user