2.x - backups

This commit is contained in:
Saeed Vaziry
2024-09-29 17:54:11 +02:00
parent e4fed24498
commit 2e9620409b
35 changed files with 1093 additions and 122 deletions

View File

@ -0,0 +1,26 @@
<?php
namespace App\Web\Components;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class Link extends Component implements Htmlable
{
public function __construct(public string $href, public string $text, public bool $external = false) {}
public function render(): View
{
return view('web.components.link');
}
public function toHtml(): View|string
{
return $this->render()->with([
'href' => $this->href,
'text' => $this->text,
'external' => $this->external,
]);
}
}