Laravel 5.5 PHP Framework with AdminLTE2
git clone https://github.com/chrissetyawan/laravel5.5-adminlte.git projectname
cd projectname
composer install # Install backend dependencies
sudo chmod 777 storage/ -R # Chmod Storage
cp .env.example .env # Update database credentials configuration
# (Dont forget to create database name following credentials configuration)
php artisan key:generate # Generate new keys for Laravel
php artisan migrate:refresh --seed # Run migration and seed users and categories for testing
yarn install # Install node dependencies
npm run production # To compile assets for prod
-
Local demo:
runphp artisan serve
Open browser at localhost:8000/admin -
Live demo:
Open browser at http://laravel55-adminlte.setyawan.pro/
Login credentials:
please dont change this two users credential. u can add new user or modify other users.
-
Superadmin
Username: superadmin@fake.com Password: 123456
-
User
Username: user@fake.com Password: 123456
All the data are reset each 30mn ;) please dont forget to remove this function in your app
- Authentication, register, forgot password
- User Management, activate/deactivate user, user pictures
- CRUD example with datatable
- Multi role user (Superadmin, Admin, Manager, User)
- Route protection role based
- Global function
- Laravel Framework (5.5.*)
- Forms & HTML : for forms
- Laravel Debugbar : for debugging
- Guzzle : PHP HTTP client
- Laravel RESTful API format : To create Rest API
- Redis : for chache
- Laravel Mix
- AdminLTE
- ApiDocs
- Ionicons
- bootstrap
- chosen
- ckeditor Full
- datatables + plugins
- datetimepicker
- font-awesome
- jquery
- sweetalert2
- iCheck
- Axios
- VueJs
- Using Laravel Mix, all CSS and JS are in minified to one file each.
- Leverages browser caching, using
.htaccess
file from html5-boilerplate - GZip compression is activated by default(APP_DEBUG=false => only onfile for js, and one file for css).
admin-HASH.css
: 63.9KB with gzip (376.5Kb without)admin-HASH.js
: 99KB with gzip (318.9Kb without)
#FAQ
Creating CRUD in your application is the job you do most. Let's create Post CRUD:
- Add new migration and model :
php artisan make:model Post -m
- Open migration file and add your columns
- Create PostsController :
php artisan make:controller
. fill your resource (you can use CategoriesController with some changes) - Duplicate
resource/views/admin/categories
folder toposts
, make changes inindex.php
,create.blade.php
,edit.blade.php
To move images using a helper function based on intervention/image and variables.php check full example in User.php
Rest Controllers are in the App\Http\Controllers\Api
namespace.
- Create new controller that extends
ApiController
class - Add your route in
api/v1
route group - Add documentation block (documentation)
- Install ApiDoc via npm, run:
npm install apidoc -g
(only first time) - Run this command :
apidoc -i app/Http/Controllers/Api/ -o public/api/ -t resources/apiTemplate/