Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
6 / 6 |
BrandTrait | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
6 / 6 |
addSiteToBrand | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
removeSiteToBrand | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
1 | <?php |
2 | namespace Qmp\Laravel\Site\Controllers; |
3 | |
4 | |
5 | use Qmp\Laravel\MicroService\Client\Client; |
6 | use Qmp\Laravel\MicroService\Client\Tools\Request as ClientRequest; |
7 | |
8 | |
9 | trait BrandTrait |
10 | { |
11 | protected function addSiteToBrand($brandId, $siteId) |
12 | { |
13 | $request = ClientRequest::createObject('service_brand', "brand/$brandId/add-site/$siteId", ['body' => ['brand_id' => $brandId, 'site_id' => $siteId]]); |
14 | $response = Client::systemSend('post', $request); |
15 | } |
16 | |
17 | protected function removeSiteToBrand($brandId, $siteId) |
18 | { |
19 | $request = ClientRequest::createObject('service_brand', "brand/$brandId/del-site/$siteId", ['body' => ['brand_id' => $brandId, 'site_id' => $siteId]]); |
20 | $response = Client::systemSend('post', $request); |
21 | } |
22 | } |