This commit is contained in:
2022-11-01 11:07:41 +08:00
commit c23de98690
131 changed files with 14088 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Api\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class AuthResource extends JsonResource
{
public function toArray($request): array
{
return [
'access_token' => 'Bearer '.$this->token,
'user_id' => $this->id,
'user_sig' => $this->user_sig,
'user_info' => [
'user_id' => $this->id,
'username' => $this->username,
'privacy' => $this->privacy,
'nickname' => $this->info->nickname,
'avatar' => $this->info->avatar,
'address' => $this->username,
],
];
}
}