Download the PHP package thegreyhatt/laravel-sbadmin2 without Composer
On this page you can find all versions of the php package thegreyhatt/laravel-sbadmin2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thegreyhatt/laravel-sbadmin2
More information about thegreyhatt/laravel-sbadmin2
Files in thegreyhatt/laravel-sbadmin2
Package laravel-sbadmin2
Short Description Start Bootstrap Admin 2 Package
License MIT
Informations about the package laravel-sbadmin2
Start Bootstrap Admin 2 integration with Laravel 5
This package provides an easy way to quickly set up SB Admin 2 with Laravel 5. It has no requirements and dependencies besides Laravel, so you can start building your admin panel immediately. The package just provides a Blade template that you can extend and advanced menu configuration possibilities.
1. Requirements
Laravel 5.5.x to 5.8.x PHP >= 7.0.0
2. Installation
-
Require the package using composer:
-
Add the service provider to the
providers
inconfig/app.php
: - Publish the public assets:
3. Updating
-
To update this package, first update the composer package:
- Then, publish the public assets with the
--force
flag to overwrite existing files
4. Usage
To use the template, create a blade file and extend the layout with @extends('sbadmin2::page')
.
This template yields the following sections:
title
: for in the<title>
tagcontent_header
: title of the page, above the contentcontent
: all of the page's contentcss
: extra stylesheets (located in<head>
)js
: extra javascript (just before</body>
)
All sections are in fact optional. Your blade template could look like the following.
You now just return this view from your controller, as usual.
5. Configuration
First, publish the configuration file:
Now, edit config/sbadmin2.php
to configure the title, skin, menu, URLs etc. All configuration options are explained in the comments. However, I want to shed some light on the menu
configuration.
5.1 Menu
You can configure your menu as follows:
With a single string, you specify a menu header item to separate the items.
With an array, you specify a menu item. text
and url
are required attributes.
The icon
is optional, if you leave it out.
The available icons that you can use are those from Font Awesome.
Just specify the name of the icon and it will appear in front of your menu item.
6. Customize views
If you need full control over the provided views, you can publish them:
Now, you can edit the views in resources/views/vendor/sbadmin2
.
7. Issues, Questions and Pull Requests
You can report issues and ask questions in the issues section. Please start your issue with ISSUE:
and your question with QUESTION:
If you have a question, check the closed issues first. Over time, I've been able to answer quite a few.
To submit a Pull Request, please fork this repository, create a new branch and commit your new/updated code in there. Then open a Pull Request from your new branch. Refer to this guide for more info.