This commit is contained in:
root 2019-11-23 01:41:47 +08:00
parent 53901ff058
commit c016216883
4 changed files with 34 additions and 2 deletions

View File

@ -45,6 +45,9 @@ class ConfigController extends Controller
],
'server' => [
'server_token' => config('v2board.server_token')
],
'tutorial' => [
'apple_id' => config('v2board.apple_id')
]
]
]);

View File

@ -0,0 +1,21 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\User;
class TutorialController extends Controller
{
public function getSubscribeUrl () {
$user = User::find($request->session()->get('id'));
return response([
'data' => config('v2board.app_url', env('APP_URL')) . '/api/v1/client/subscribe?token=' . $user['token']
]);
}
public function getAppleID () {
}
}

View File

@ -27,7 +27,10 @@ class ConfigSave extends FormRequest
'stripe_pk_live',
'stripe_alipay_enable',
'stripe_wepay_enable',
'stripe_webhook_key'
'stripe_webhook_key',
// tutorial
'apple_id',
'apple_id_password'
];
}
/**
@ -53,7 +56,9 @@ class ConfigSave extends FormRequest
'alipay_privkey' => 'max:2048',
// stripe
'stripe_alipay_enable' => 'in:0,1',
'stripe_wepay_enable' => 'in:0,1'
'stripe_wepay_enable' => 'in:0,1',
// tutorial
'apple_id' => 'email'
];
}

View File

@ -66,6 +66,9 @@ Route::prefix('v1')
// Invite
Route::get('invite', 'InviteController@index');
Route::get('invite/save', 'InviteController@save');
// Tutorial
Route::get('tutorial/getSubscribeUrl', 'TutorialController@getSubscribeUrl');
Route::get('tutorial/getAppleID', 'TutorialController@getAppleID');
});
// Passport