PHPackages                             kykurniawan/laravel-sb-admin-template - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. kykurniawan/laravel-sb-admin-template

ActiveLibrary[Templating &amp; Views](/categories/templating)

kykurniawan/laravel-sb-admin-template
=====================================

Laravel SB Admin Template

v2.0.3(3y ago)116MITCSS

Since Apr 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kykurniawan/laravel-sb-admin-template)[ Packagist](https://packagist.org/packages/kykurniawan/laravel-sb-admin-template)[ RSS](/packages/kykurniawan-laravel-sb-admin-template/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

Laravel SB Admin Template
=========================

[](#laravel-sb-admin-template)

Laravel SB Admin Template is a package that provides an easy way to integrate the popular SB Admin Template into your Laravel project.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kykurniawan/laravel-sb-admin-template
```

Install the template:

```
php artisan laravel-sb-admin-template:install
```

This will copy the necessary assets (CSS, JS, images, fonts) to your public directory, and configuration file to your config directiory.

Usage
-----

[](#usage)

After successfully install the package, we can use the pre-built dashboard layout, simply extend the sb-admin layout in your view:

```
@extends('laravel-sb-admin-template::admin')

@section('title', 'Hello World!')

@section('content')

@endsection
```

You may want to add something on your template's head

```
@extends('laravel-sb-admin-template::admin')

@section('head')
@parent

@endsection

@section('content')

@endsection
```

You can also add something on your template's foot (before body closing tag)

```
@extends('laravel-sb-admin-template::admin')

@section('foot')
@parent

@endsection

@section('content')

@endsection
```

**Note:**The `@parent` directive is keeps default element being loaded (template style, template script). If you don't add this directive, you need to include template's style or template's script manually

```

@section('head')
@include('laravel-sb-admin-template::partials.style')

@endsection

@section('foot')
@include('laravel-sb-admin-template::partials.script')

@endsection
```

Configuration
-------------

[](#configuration)

The package's configuration file is located at config/laravel-sb-admin-template.php. Here you can customize various aspects of the template, such as the template views, section name, etc.

Template Customization
----------------------

[](#template-customization)

To customize the template for your project, you can do it in the boot method on the AppServiceProvider using the Facade template provided by this package.

Import template facade and template components:

```
use KyKurniawan\LaravelSBAdminTemplate\Facades\Template;
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\Footer;
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\Navbar;
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\NavbarDropDownItem;
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\Sidebar;
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\SidebarFooter;
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\SidebarItem;
```

then, in the boot method on your app service provider:

```
class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        Template::navbar(
            Navbar::make()
                ->brandTitle('This is awesome')
                ->brandHref('/')
                ->dropDownItems([
                    NavbarDropDownItem::make()->text('Drop Down Link 1'),
                    NavbarDropDownItem::make()->type('divider'),
                    NavbarDropDownItem::make()->text('Drop Down Link 2'),
                ])
        );

        Template::sidebar(
            Sidebar::make()
                ->sidebarItems([
                    SidebarItem::make()->type('heading')->text('Main'),
                    SidebarItem::make()
                        ->text('Link 1')
                        ->children([
                            SidebarItem::make()->text('Link 1.1'),
                            SidebarItem::make()->text('Link 1.2'),
                        ]),
                    SidebarItem::make()->type('heading')->text('Config'),
                    SidebarItem::make()
                        ->text('Link 2'),
                    SidebarItem::make()
                        ->text('Link 3'),
                ])
                ->sidebarFooter(
                    SidebarFooter::make()
                        ->text('Halo Footer')
                )
        );

        Template::footer(
            Footer::make()
                ->copyright('Hello World')
                ->visible(true)
        );
    }
}
```

### Template Components Class

[](#template-components-class)

#### Navbar

[](#navbar)

```
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\Navbar;
```

**`make()`**

Initialize the component. This is static method. You need to call this method when create the component.

**`brandTitle(string|callable)`**

Set navbar brand title. Accept string or function that returns string.

**`brandHref(string|callable)`**

Set navbar brand href link. Accept string or function that returns string.

**`dropDownIcon(string|callable)`**

Set navbar dropdown icon. Accept string or function that returns string.

**`dropDownItems([])`**

Set the navbar dropdown item. Accept array of `NavbarDropDownItem` component.

#### NavbarDropDownItem

[](#navbardropdownitem)

```
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\NavbarDropDownItem;
```

**`make()`**

Initialize the component. This is static method. You need to call this method when create the component.

**`type(string)`**

Set item type. Allowed types: \[link, divider, view\].

**`text(string|callable)`**

Set item text. Only work when item type is link. Accept string or function that returns string.

**`href(sring|callable)`**

Set item href link. Only work when item type is link. Accept string or function that returns string.

**`target(sring|callable)`**

Set item target link. Only work when item type is link. Accept string or function that returns string.

**`visible(bool|callable)`**

Set item visibility. Accept boolean or function that returns boolean.

**`view(string|callable)`**

Set item blade view name (from your view folder). Only work if item type is view. Accept string or function that returns string.

#### Sidebar

[](#sidebar)

```
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\Sidebar;
```

**`make()`**

Initialize the component. This is static method. You need to call this method when create the component.

**`sidebarItems([])`**

Set sidebar menu items. Accept array of `SidebarItem` component.

**`sidebarFooter(SidebarFooter)`**

Set sidebar footer component. Accept object of `SidebarItem` component.

#### SidebarItem

[](#sidebaritem)

```
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\SidebarItem;
```

**`make()`**

Initialize the component. This is static method. You need to call this method when create the component.

**`type(string)`**

Set item type. Allowed types: \[link, heading\].

**`text(string|callable)`**

Set item text. Accept string or function that returns string.

**`href(sring|callable)`**

Set item href link. Only work when item type is link.

**`target(sring|callable)`**

Set item target link. Only work when item type is link. Accept string or function that returns string.

**`visible(bool|callable)`**

Set item visibility. Accept boolean or function that returns boolean.

**`icon(string|callable)`**

Set item icon. Only work when item type is link. Accept string or function that returns string.

**`active(bool|callable)`**

Set item active state. Accept boolean or function that returns boolean. Only work when item type is link.

**`children([])`**Set item children (nested item). Accept array of `SidebarItem` component. Only work if item type is link.

#### SidebarFooter

[](#sidebarfooter)

```
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\SidebarFooter;
```

**`make()`**

Initialize the component. This is static method. You need to call this method when create the component.

**`text(string|callable)`**

Set sidebar footer text. Accept string or function that returns string.

**`visible(bool|callable)`**

Set sidebar footer visibility. Accept boolean or function that returns boolean.

#### Footer

[](#footer)

```
use KyKurniawan\LaravelSBAdminTemplate\TemplateComponents\Footer;
```

**`make()`**

Initialize the component. This is static method. You need to call this method when create the component.

**`copyright(string|callable)`**

Set footer copyright text. Accept string or function that returns string.

**`visible(bool|callable)`**

Set footer visibility. Accept boolean or function that returns boolean.

---

**Note:** request object are passed to all callable functions. Example:

```
Footer::make()->copyright(function($request) {
    return $request->query('copyright');
})
```

---

Overriding Template
-------------------

[](#overriding-template)

This package has been made in such a way that you only need to extend the layout. However, if you want more specific needs, you can copy the template's views into your project and make any modifications you want.

To do that, you have to publish the views:

```
php artisan vendor:publish --provider="KyKurniawan\LaravelSBAdminTemplate\ServiceProvider" --tag="sb-admin-views"
```

After overriding the template view, you must tell the package to use the view you created instead of the default template view. You can do this through the config file.

Credits
-------

[](#credits)

This package was inspired by the SB Admin Template by Start Bootstrap. Special thanks to [David Miller](https://github.com/davidtmiller) for creating this awesome template.

License
-------

[](#license)

The Laravel SB Admin Template package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

1130d ago

Major Versions

v1.0.1 → v2.0.02023-04-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8112a6c743cc35ade1edd49be754cac784f39bb2e6e83bc8e3a0e3b6d0c6259?d=identicon)[kykurniawan](/maintainers/kykurniawan)

---

Top Contributors

[![kykurniawan](https://avatars.githubusercontent.com/u/55426692?v=4)](https://github.com/kykurniawan "kykurniawan (11 commits)")

---

Tags

laravelsbadmintemplate

### Embed Badge

![Health badge](/badges/kykurniawan-laravel-sb-admin-template/health.svg)

```
[![Health](https://phpackages.com/badges/kykurniawan-laravel-sb-admin-template/health.svg)](https://phpackages.com/packages/kykurniawan-laravel-sb-admin-template)
```

###  Alternatives

[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

703141.0k7](/packages/tallstackui-tallstackui)[moonshine/moonshine

Laravel administration panel

1.3k217.1k59](/packages/moonshine-moonshine)[livewire/blaze

A tool for optimizing Blade component performance by folding them into parent templates

688221.3k17](/packages/livewire-blaze)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
