init
This commit is contained in:
18
app/Api/Resources/UserInfoBaseResource.php
Normal file
18
app/Api/Resources/UserInfoBaseResource.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Api\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class UserInfoBaseResource extends JsonResource
|
||||
{
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'user_id' => $this->id,
|
||||
'username' => $this->username,
|
||||
'nickname' => $this->info->nickname,
|
||||
'avatar' => $this->info->avatar,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user