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: