Merge branch 'trunk'
This commit is contained in:
commit
af077eb74a
5 changed files with 36 additions and 4 deletions
33
app/View/Components/LocalBlockComponent.php
Normal file
33
app/View/Components/LocalBlockComponent.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use App\Enums\StaticPageType;
|
||||
use App\Models\StaticPage;
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class LocalBlockComponent extends Component
|
||||
{
|
||||
/** @var $staticPageModel \App\Models\StaticPage */
|
||||
private $staticPageModel;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->staticPageModel = StaticPage::query()->where('type', StaticPageType::our_commitments)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.local-block-component', [
|
||||
'staticPageModel' => $this->staticPageModel
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -60,6 +60,6 @@
|
|||
</div>
|
||||
|
||||
<!-- LOCAL BLOCK -->
|
||||
@include('fo.partials.local-block')
|
||||
<x-local-block-component />
|
||||
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- LOCAL BLOCK -->
|
||||
@include('fo.partials.local-block')
|
||||
|
||||
<x-local-block-component />
|
||||
<!-- GAMMES -->
|
||||
<div class="container-fluid pt-5 text-center">
|
||||
<div class="row">
|
||||
|
|
|
|||
|
|
@ -118,6 +118,6 @@
|
|||
</div>
|
||||
|
||||
<!-- LOCAL BLOCK -->
|
||||
@include('fo.partials.local-block')
|
||||
<x-local-block-component />
|
||||
|
||||
@endsection
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue