The Footer
system component is used to create a footer block in MoonShine.
You can create a Footer using the static make()
method class Footer
.
make(array $components = [])
make(array $components = [])
make(array $components = [])
make(array $components = [])
make(array $components = [])
$components
- an array of components that are located in the footer.
namespace App\MoonShine;
use App\MoonShine\Components\MyComponent;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
Footer::make([
MyComponent::make(),
])
]);
}
}
namespace App\MoonShine;
use App\MoonShine\Components\MyComponent;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make([
MyComponent::make(),
])
]);
}
}
namespace App\MoonShine;
use App\MoonShine\Components\MyComponent;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make([
MyComponent::make(),
])
]);
}
}
namespace App\MoonShine;
use App\MoonShine\Components\MyComponent;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make([
MyComponent::make(),
])
]);
}
}
namespace App\MoonShine;
use App\MoonShine\Components\MyComponent;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make([
MyComponent::make(),
])
]);
}
}
The copyright()
method allows you to design a copyright block in the footer.
copyright(string|Closure $text)
copyright(string|Closure $text)
copyright(string|Closure $text)
copyright(string|Closure $text)
copyright(string|Closure $text)
namespace App\MoonShine;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
Footer::make()
->copyright(fn (): string => <<<HTML
© 2021-2023 Made with ❤️ by
<a href="https://cutcode.dev"
class="font-semibold text-primary hover:text-secondary"
target="_blank"
>
CutCode
</a>
HTML
)
]);
}
}
namespace App\MoonShine;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make()
->copyright(fn (): string => <<<HTML
© 2021-2023 Made with ❤️ by
<a href="https://cutcode.dev"
class="font-semibold text-primary hover:text-secondary"
target="_blank"
>
CutCode
</a>
HTML
)
]);
}
}
namespace App\MoonShine;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make()
->copyright(fn (): string => <<<HTML
© 2021-2023 Made with ❤️ by
<a href="https://cutcode.dev"
class="font-semibold text-primary hover:text-secondary"
target="_blank"
>
CutCode
</a>
HTML
)
]);
}
}
namespace App\MoonShine;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make()
->copyright(fn (): string => <<<HTML
© 2021-2023 Made with ❤️ by
<a href="https://cutcode.dev"
class="font-semibold text-primary hover:text-secondary"
target="_blank"
>
CutCode
</a>
HTML
)
]);
}
}
namespace App\MoonShine;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make()
->copyright(fn (): string => <<<HTML
© 2021-2023 Made with ❤️ by
<a href="https://cutcode.dev"
class="font-semibold text-primary hover:text-secondary"
target="_blank"
>
CutCode
</a>
HTML
)
]);
}
}
The menu()
method allows you to design a block in a menu in the footer.
menu(array $data)
menu(array $data)
menu(array $data)
menu(array $data)
menu(array $data)
$data
- an array of elements, where the key is the url and the value is the name of the menu item.
namespace App\MoonShine;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
Footer::make()
->menu([
'https://moonshine-laravel.com/docs' => 'Documentation',
])
]);
}
}
namespace App\MoonShine;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make()
->menu([
'https://moonshine-laravel.com/docs' => 'Documentation',
])
]);
}
}
namespace App\MoonShine;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make()
->menu([
'https://moonshine-laravel.com/docs' => 'Documentation',
])
]);
}
}
namespace App\MoonShine;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make()
->menu([
'https://moonshine-laravel.com/docs' => 'Documentation',
])
]);
}
}
namespace App\MoonShine;
use MoonShine\Components\Layout\Footer;
use MoonShine\Components\Layout\LayoutBuilder;
use MoonShine\Contracts\MoonShineLayoutContract;
final class MoonShineLayout implements MoonShineLayoutContract
{
public static function build(): LayoutBuilder
{
return LayoutBuilder::make([
//...
Footer::make()
->menu([
'https://moonshine-laravel.com/docs' => 'Documentation',
])
]);
}
}
