for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace MichaelRubel\Formatters\Collection;
use Illuminate\Support\Str;
use MichaelRubel\Formatters\Formatter;
class TableColumnFormatter implements Formatter
{
/**
* @param string|null $string
*/
public function __construct(
public ?string $string = null
) {
}
* Format the snake-cased attributes in readable format for the tables.
*
* @return string
public function format(): string
return Str::ucfirst(
Str::replace(
'_',
' ',
$this->string
)
);