for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Xetaravel\View\Components;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Str;
use Illuminate\View\Component;
class Header extends Component
{
public string $anchor = '';
public function __construct(
public ?string $title = null,
public ?string $subtitle = null,
public ?bool $separator = false,
public ?string $progressIndicator = null,
public ?bool $withAnchor = false,
public ?string $size = 'text-2xl',
// Slots
public mixed $middle = null,
public mixed $actions = null,
) {
$this->anchor = Str::slug($title);
}
public function progressTarget(): ?string
if ($this->progressIndicator === 1) {
$this->progressIndicator === 1
false
return $this->attributes->whereStartsWith('progress-indicator')->first();
return $this->progressIndicator;
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
return view('components.header');