Add Breadcrumb class for breadcrumb links
This commit is contained in:
parent
ec9abbe5c0
commit
61d8cb2e3d
22
src/Libs/Breadcrumb.php
Normal file
22
src/Libs/Breadcrumb.php
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user