Use AdminLTE in Laravel5. *

Source: Internet
Author: User
Use AdminLTE in Laravel5. * and use AdminLTE in Laravel5. *

AdminLTE is a great background Template built solely by HTML and CSS. in this article, I will show you how to integrate AdminLTE and Laravel elegantly, in addition, we can use Bower to promptly update and manage AdminLTE.

Tools we use
  • Laravel

  • AdminLTE 2.3.2

  • Bower

  • Composer

  • Download a brand new Laravel

    If you are not sure, go to the official website to view the link
    Here we can directly use the command line

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

    Using this command, we created a new Laravel project named myapp. if you succeed, you can see the image below.

    Download AdminLTE from Bower

    Go to the myapp/public folder

            cd myapp/public

    Execute the following command in this folder

        bower install admin-lte        

    Once completed, you will find an additional bower_componets folder, and in this folder you will see AdminLTE

    Convert starter.html of AdminLTE to a Blade Template

    Laravel uses a good template engine Blade here. to make full use of Blade, we need to apply some common starting HTML pages to the Blade template, first, create a view named admin_template.blade.php in the resources/views folder, and then create a corresponding route for this page. As shown in the following

            Route::get('admin', function () {        return view('admin_template');    });

    Then, copy the content in bower_components/admin-lte/starter.html to our view template and direct the links to the corresponding directory of AdminLTE. The following is my initial settings:

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.