Laravel 5.6 - AdminLTE Bootstrap Theme Installation Example


AdminLTE is a great Bootstrap Admin theme for Laravel development. In this tutorial i will let you know how to install bootstrap adminlte admin theme in Laravel 5.6 Application. always first step to integration admin bootstrap theme in laravel application, we will use git package for install free AdminLTE Bootstrap Theme. so just simply follow bellow step.

we always require to install theme for any erp level project or API level project. So here i will give you small and quick example for install AdminLTE theme in laravel.

Few days ago i posted for Custom Bootstrap Admin theme installation from Scratch, you can also set your custom admin theme in laravel, you can follow this link : PHP Laravel 5.5 - Bootstrap Admin Theme Integration example from scratch.

Here you have to just install composer package of adminatle and just need to use. i make example you can see and use it.

Install adminatle Package:

here we will install adminLTE composer package so you need to run bellow composer command for install package and then we make a configuration too.

composer require jeroennoten/laravel-adminlte

After successfully install package, open config/app.php file and add service provider and alias.

config/app.php

'providers' => [

....

JeroenNoten\LaravelAdminLte\ServiceProvider::class,

],

now we will render configuration of asset file, this will publish public asset files, so let's run bellow command:

php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=assets

now we will render configuration of config file, this will publish public asset files, so let's run bellow command:

php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=config

now you can edit default configuration on this file : "config/adminlte.php".

Add Route and Blade File:

Now we will add routes for demo example, so simply add following route in your route file:

routes/web.php

Route::get('my-theme', function () {

return view('welcome2');

});

At last we require to create blade file call welcome2.blade.php, will bootstrap layout. So let's add bellow code:

resources/views/welcome2.blade.php

@extends('adminlte::page')


@section('title', 'Dashboard')


@section('content_header')

<h1>Dashboard</h1>

@stop


@section('content')

<p>Welcome to this beautiful admin panel - HDTuto.com.</p>

@stop


@section('css')

<link rel="stylesheet" href="/css/admin_custom.css">

@stop


@section('js')

<script> console.log('Hi!'); </script>

@stop

Now you can also get more info about adminlte theme from here : Laravel AdminLTE Theme.

I hope you found your best solution...






March 30, 2018 | 7193 Viewer | Category : PHP Laravel Laravel 5 Laravel 5.6
Related Posts