Системный компонент Footer используется для создания блока подвала в MoonShine.
Вы можете создать Footer, используя статический метод make()
класса Footer
.
make(array $components = [])
make(array $components = [])
make(array $components = [])
make(array $components = [])
make(array $components = [])
$components
- массив компонентов, которые располагаются в подвале.
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(),
])
]);
}
}
Метод copyright()
позволяет оформить блок авторских прав в подвале.
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 Сделано с ❤️ от
<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 Сделано с ❤️ от
<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 Сделано с ❤️ от
<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 Сделано с ❤️ от
<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 Сделано с ❤️ от
<a href="https://cutcode.dev"
class="font-semibold text-primary hover:text-secondary"
target="_blank"
>
CutCode
</a>
HTML
)
]);
}
}
Метод menu()
позволяет оформить блок меню в подвале.
menu(array $data)
menu(array $data)
menu(array $data)
menu(array $data)
menu(array $data)
$data
- массив элементов, где ключ - это url, а значение - название пункта меню.
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' => 'Документация',
])
]);
}
}
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' => 'Документация',
])
]);
}
}
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' => 'Документация',
])
]);
}
}
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' => 'Документация',
])
]);
}
}
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' => 'Документация',
])
]);
}
}