Search code examples
laraveladminintegratelte

How to integrate Admin Lte theme in Laravel 5.4


Need Help to integrate Admin Lte theme in la ravel 5.4 , i try to integrate it but it show black pages.


Solution

  • Download laravel project folder by using:

     composer create-project --prefer-dist laravel/laravel laravelLTE
    

    Create database named :laravel and make database related changes in .env file

    DB_CONNECTION=mysql    
    DB_HOST=127.0.0.1  
    DB_PORT=3306  
    DB_DATABASE=laravel  
    DB_USERNAME=root  
    DB_PASSWORD=null 
    

    Goto the folder path

     /var/www/html$ cd  laravelLTE
    

    To run all of your outstanding migrations, execute the migrate Artisan command:

         /var/www/html/laravelLTE$ php artisan migrate
    

    In case of string error make changes in following page :

    /var/www/html/laravel/app/Providers/AppServiceProvider.php

    use Illuminate\Support\Facades\Schema; 
    
        public function boot()   
        { 
          Schema::defaultStringLength(191); 
        }
    

    Inorder to install Admin Lte theme hit following commands in your terminal:

    composer require "acacha/admin-lte-template-laravel:4.*"    
    composer update
    

    To register the Service Provider edit the file

    config/app.php

    And add following line to providers array:

      Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class,
    

    To Register Alias edit the file

    config/app.php

    And add following line to alias array:

    'AdminLTE' => Acacha\AdminLTETemplateLaravel\Facades\AdminLTE::class,
    

    Get configuration file in your application from vendor package file.

     /var/www/html/laravelLTE$ php artisan vendor:publish --tag=adminlte –force
     /var/www/html/laravelLTE$ php artisan serve
    

    thank you
    I hope this will help you to integrate adminLTE theme