This commit is contained in:
2023-03-08 09:16:04 +08:00
commit e78454540f
1318 changed files with 210569 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Routing\Controller as BaseController;
use Jason\Api\Traits\ApiResponse;
class Controller extends BaseController
{
use ApiResponse;
/**
* Notes : 授权token返回格式
*
* @Date : 2021/3/16 5:00 下午
* @Author : <Jason.C>
* @param string $token
* @return array
*/
protected function respondWithToken(string $token): array
{
return [
'access_token' => $token,
'token_type' => 'Bearer',
'expires_in' => auth('api')->factory()->getTTL() * 60,
];
}
}