1
0
Fork 0

Adding app/View/Components/Layout.php

This commit is contained in:
Henrik Hautakoski 2021-12-31 16:02:36 +01:00
parent 0f5779b1e6
commit 1f7b1d80ab

View file

@ -0,0 +1,28 @@
<?php
namespace App\View\Components;
use Illuminate\View\Component;
class Layout extends Component
{
/**
* Layout name
*/
public string $name;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(string $name = 'app')
{
$this->name = $name;
}
public function render()
{
return view("layouts.{$this->name}");
}
}