Use the AdminLTE template in the Laravel framework of PHP to compile the website background interface _ PHP

Source: Internet
Author: User
This article describes how to use the AdminLTE template in the Laravel framework of PHP to compile the website background. AdminLTE is based on BootStrap and can help you quickly create a website background management panel interface, for more information, see AdminLTE, which is based on Bootstrap 3. x's free advanced management control panel theme, fully Responsive Management, suitable for screen resolutions ranging from small mobile devices to large desktops.

AdminLTE features:

  • Full response
  • Categorized dashboard
  • 18 plug-ins and 3 Custom plug-ins
  • Light and fast
  • Compatible with most mainstream browsers
  • Full support for Glyphicons, Fontawesome, and icons

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.