Basics
The Footer component is used to create a footer block in MoonShine.
You can create a Footer using the static method make()
of the Footer
class.
make(iterable $components = [])
-
$components
- an array of components that are placed in the footer.
namespace App\MoonShine\Layouts; use MoonShine\UI\Components\Layout\Footer; final class MoonShineLayout extends AppLayout{ public function build(): Layout { return Layout::make([ //... Footer::make([ // .. ]), // ... ]); }}
<x-moonshine::layout.footer copyright="Your brand" :menu="['https://moonshine-laravel.com/docs' => 'Documentation']">Any content</x-moonshine::layout.footer>
Copyright
The method copyright()
allows you to create a copyright block in the footer.
copyright(string|Closure $text)
Footer::make()->copyright(fn (): string => 'Your brand')
Menu
The method menu()
allows you to create a menu block in the footer.
/** * @param array<string, string> $data */menu(array $data)
-
$data
- an array of items where the key is the URL, and the value is the name of the menu item.
Footer::make() ->menu([ 'https://moonshine-laravel.com/docs' => 'Documentation', ])