@@ 10-19 (lines=10) @@ | ||
7 | ||
8 | trait HasEndpoints |
|
9 | { |
|
10 | public function endpoints(string $controller = null, $parameters = null): EndpointResource |
|
11 | { |
|
12 | $endPointResource = new EndpointResource($this->resource, EndpointResourceType::LOCAL); |
|
13 | ||
14 | if ($controller !== null) { |
|
15 | $endPointResource->addController($controller, Arr::wrap($parameters)); |
|
16 | } |
|
17 | ||
18 | return $endPointResource; |
|
19 | } |
|
20 | ||
21 | public static function globalEndpoints(string $controller = null, $parameters = null): EndpointResource |
|
22 | { |
|
@@ 21-30 (lines=10) @@ | ||
18 | return $endPointResource; |
|
19 | } |
|
20 | ||
21 | public static function globalEndpoints(string $controller = null, $parameters = null): EndpointResource |
|
22 | { |
|
23 | $endPointResource = new EndpointResource(null, EndpointResourceType::GLOBAL); |
|
24 | ||
25 | if ($controller !== null) { |
|
26 | $endPointResource->addController($controller, Arr::wrap($parameters)); |
|
27 | } |
|
28 | ||
29 | return $endPointResource; |
|
30 | } |
|
31 | ||
32 | public static function meta() |
|
33 | { |