Используется для создания шаблонов в MoonShine.
Системный компонент Layout
является стартовой точкой при создании шаблонов и используется единожды в методе build()
.
make(iterable $components = [])
make(iterable $components = [])
make(iterable $components = [])
make(iterable $components = [])
make(iterable $components = [])
$components
- массив компонентов.
namespace App\MoonShine\Layouts;
use MoonShine\UI\Components\Layout\Layout;
final class MoonShineLayout extends AppLayout
{
public function build(): Layout
{
return Layout::make([
]);
}
}
namespace App\MoonShine\Layouts;
use MoonShine\UI\Components\Layout\Layout;
final class MoonShineLayout extends AppLayout
{
public function build(): Layout
{
return Layout::make([
// ...
]);
}
}
namespace App\MoonShine\Layouts;use MoonShine\UI\Components\Layout\Layout;final class MoonShineLayout extends AppLayout{ public function build(): Layout { return Layout::make([ // ... ]); }}
namespace App\MoonShine\Layouts;
use MoonShine\UI\Components\Layout\Layout;
final class MoonShineLayout extends AppLayout
{
public function build(): Layout
{
return Layout::make([
// ...
]);
}
}
namespace App\MoonShine\Layouts;use MoonShine\UI\Components\Layout\Layout;final class MoonShineLayout extends AppLayout{ public function build(): Layout { return Layout::make([ // ... ]); }}
<x-moonshine::layout>
Any content
</x-moonshine::layout>
<x-moonshine::layout>
Any content
</x-moonshine::layout>
<x-moonshine::layout> Any content</x-moonshine::layout>
<x-moonshine::layout>
Any content
</x-moonshine::layout>
<x-moonshine::layout> Any content</x-moonshine::layout>