Access all articles in sprocket icon.
Published February 26, 2017 by Bill Keck.
Admin-Dash uses Admin LTE for Laravel 5.4
I built an admin panel implementation for Laravel 5.4 using Abdullah Almsaeed’s amazing Admin LTE template. I’ve made this starter application available for free on github:
On the admin panel itself, I’ve pulled in all the examples, including:
- Layout Options
- UI Elements
- Page Examples
You can reference everything from within the application. This includes cool plugins like flot charts and map integrations. Just go to the github page for a screen shot of the panel itself. You can learn a lot by playing with this template and looking at how things are implemented.
In addition to all the amazing plugins you get out of the box with Admin LTE, I’ve also incorporated one-click social sign in for Facebook and Github. I also created some examples, using Vue.js for datagrids with paginated, sortable, and searchable data columns.
If you are familiar with my book, Laravel 5.4 For Beginners, you will recognize many of the implementations from there. On the other hand, things are a little more complicated. For example, we use 3 master pages:
And there are lot of partials to go along with them. Doing it this way gives us a lot of flexibility over managing assets and cuts down on a lot of if statements in the views that would otherwise check to see if the user was a guest, logged in, or logged in as admin.
I’ve become a big fan of view partials. For example, even if a form is simple, I extract it out to a partial. This really helps with code separation, since I can dedicate the main view files to layout instead of logic. It also has the effect of making the code so much more readable, helping with maintainability.
Also in this implementation, I extracted out some child components for the datagrids in Vue.js, which cuts down on code repetition. I got rid of the big ugly handler for all the queries and put in a utilities file.
Those are all extras, however, and you are free to use or not use them as you wish. The main focus was in pulling in the main Admin LTE template in a Laravel starter application that is a great starting point for building something.
The github page includes github instructions for forking Admin-Dash, so you can pull the repo into your github account and play with it from there. I also included installation instructions for the app key, .env file, and a few other settings that you will need.
Thanks again to everyone who is supporting my work by purchasing my book. Also, I’m happy to report we got our first ratings, which all came in at 5 stars.
Please leave a rating or review at GoodReads.com, it will help get the word out for the book, I really appreciate it.