Add Breadcrumb class for breadcrumb links

This commit is contained in:
Ryan Prather 2024-12-10 23:12:08 -05:00
parent ec9abbe5c0
commit 61d8cb2e3d

22
src/Libs/Breadcrumb.php Normal file
View File

@ -0,0 +1,22 @@
<?php
namespace App\Libs;
class Breadcrumb
{
public function __construct(
private string $link,
private string $name
) {
}
public function __toString(): string
{
return <<<HTML
<li class='breadcrumb-item text-sm'>
<a class='opacity-6 opacity-5 text-dark' href="{$this->link}">{$this->name}</a>
</li>
HTML;
}
}