如何在 Laravel 5.4 中集成 Admin Lte 主题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/43494986/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 15:49:28  来源:igfitidea点击:

How to integrate Admin Lte theme in Laravel 5.4

laraveladminintegratelte

提问by yogesh godse

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

需要帮助在 la ravel 5.4 中集成 Admin Lte 主题,我尝试集成它但它显示黑页。

回答by Vidya

Download laravel project folder by using:

使用以下命令下载 laravel 项目文件夹:

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

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

创建名为 :laravel 的数据库并在 .env 文件中进行与数据库相关的更改

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:

要运行所有未完成的迁移,请执行 migrate Artisan 命令:

     /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

/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:

为了安装 Admin Lte 主题,请在您的终端中点击以下命令:

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

To register the Service Provider edit the file

注册服务提供商编辑文件

config/app.php

配置/app.php

And add following line to providers array:

并将以下行添加到 providers 数组:

  Acacha\AdminLTETemplateLaravel\Providers\AdminLTETemplateServiceProvider::class,

To Register Alias edit the file

注册别名编辑文件

config/app.php

配置/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

谢谢
我希望这会帮助您集成 adminLTE 主题