Integrate SB Admin 2 in Laravel

Published: (May 3, 2026 at 12:32 AM EDT)
2 min read
Source: Dev.to

Source: Dev.to

Laravel 11 Requirements

php -v    # >= 8.2
composer -v
node -v   # >= v14.16
npm -v

Start Apache & MySQL on your web server.

Install Laravel 11

composer create-project "laravel/laravel:^11.0" example-app

or using the Laravel installer:

composer global require laravel/installer
laravel new example-app

.env configuration

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_db
DB_USERNAME=root
DB_PASSWORD=your_password

Migrate & serve

php artisan migrate
php artisan serve

Download SB Admin 2

  1. Clone or download the repository raflizocky/laravel11-sbadmin2.
  2. Extract and rename the folder to sbadmin2 (or any name you prefer).
  3. Move the folder into Laravel’s public directory.

Base Layout

Create a Blade component for the layout:

resources/views/components/layout.blade.php

Copy the content of index.html from SB Admin 2 into this file and update all asset paths, e.g.:

Components

Header (resources/views/components/header.blade.php)

  ...
    
        
            Copyright © Your Website 2021
        
    

(Add your sidebar markup here, following the SB Admin 2 template.)

Topbar (resources/views/components/topbar.blade.php)

(Add your topbar markup here, following the SB Admin 2 template.)

Layout Blade (resources/views/layout.blade.php)

    
        
        
            
                
                
                    {{ $slot }}
                
            
            
        
    

Dashboard

Controller (app/Http/Controllers/DashboardController.php)


    
        
## Dashboard

    
    
        
    

Need help building your app?
raflizocky.netlify.app

Support the author:

  • PayPal:
  • Saweria:
0 views
Back to Blog

Related posts

Read more »

Making my own framework. Any tips?

!Cover image for Making my own framework. Any tips?https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fde...