ldc-legaulois/app/View/Components/Fo/Story/WhoWeAre.php
2024-10-08 12:22:52 +02:00

39 lines
974 B
PHP

<?php
namespace App\View\Components\Fo\Story;
use Illuminate\View\Component;
use App\Models\StaticPage;
use App\Enums\StaticPageType;
class WhoWeAre extends Component
{
/** @var \App\Models\StaticPage $staticPageModel */
public $staticPageModel;
/** @var boolean $displayButton */
public bool $displayButton;
/**
* Create a new component instance.
*
* @param boolean $displayButton
*/
public function __construct(bool $displayButton = false)
{
$this->staticPageModel = StaticPage::getCachedStaticPage(StaticPageType::story);
$this->displayButton = $displayButton;
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View
*/
public function render(): \Illuminate\Contracts\View\View
{
return view('components.fo.story.who-we-are', [
'staticPageModel' => $this->staticPageModel,
]);
}
}