for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Spatie\ResourceLinks\Formatters;
class LayeredFormatter implements Formatter
{
public function format(Endpoint $endpoint): array
$format = [
$endpoint->name => [
'method' => $endpoint->method,
'action' => $endpoint->action,
],
];
return is_null($endpoint->prefix)
? $format
: [$endpoint->prefix => $format];
}