Components

Layout

Used to create MoonShine layouts.

The system component Layout is the starting point when creating layouts and is used once in the build() method.

make(iterable $components = [])
make(iterable $components = [])
  • $components - array of 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([
// ...
]);
}
}
<x-moonshine::layout>
Any content
</x-moonshine::layout>
<x-moonshine::layout>
Any content
</x-moonshine::layout>