whiz / laravel-whiz-api
用于管理微服务连接的包
1.5.5
2021-12-03 22:33 UTC
Requires
- guzzlehttp/guzzle: ^6.5
This package is not auto-updated.
Last update: 2024-09-21 11:02:47 UTC
README
此包用于管理微服务连接。
安装
composer require whiz/laravel-whiz-api
配置和使用
- 将以下参数添加到.env文件中
WHIZ_API_BASE_URL=
WHIZ_CLIENT_ID=
WHIZ_CLIENT_SECRET=
- 将以下内容添加到控制器中,作为依赖注入。
public function functionExample(Whiz $whiz){
$response = $whiz->userService->person->store([
"name" => "John",
"last_name" => "Doe",
"birthdate" => "1992-01-01",
"document_type" => "DNI",
"document_number" => "12345678",
"phone" => "123456789"
]);
return response()->json($response->response->data);
}
可用服务
- userService(用户和认证)
- imageService(CDN图片和优化格式)
- mailingService(事务性和群发邮件)
- localizationService(本地化、边界等)
UserService
1. user
- index
- show
- store
- update
- destroy
- showUserByEmail
- storeWithPerson
- updateWithPerson
2. person
- index
- show
- store
- update
- destroy
3. role
- index
- show
- store
- update
- destroy
4. ability
- index
- show
- store
- update
- destroy
5. auth
- login
- forgotPassword
- findPassword
- resetPassword
ImageService
- store
- loadByUrl
MailingService
single (in order and use with chains)
- prepareMail
- setView
- addCC
- sendMail
list
- index
- store
- update
- destroy
- show
- addPeople
- removePeople
- showPeople
- setView
- send
LocalizationService(未测试)
- zoneByProvider
- dangerZone