LaraLTE2, Laravel PHP Framework with AdminLTE2

Overview

LaraLTE2

Laravel PHP Framework with AdminLTE2

Whenever I start a new Laravel project, I do the same thing; Install packages, download Javascript plugins...etc.
This repository helps me bootstrap all of that.

Note: if you want to use Laravel 5.2, 5.3, 5.4 please checkout to branch

Setup:

All you need is to run these commands:

git clone https://github.com/kossa/laralte2.git
cd laralte2 
composer install                   # Install backend dependencies
sudo chmod 777 storage/ -R         # Chmod Storage
cp .env.example .env               # Update database 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

Demo:

Note:
Username: [email protected]
Password: 123456

All the data are reset each 30mn ;) please d'ont forget to remove this function in your app


Included Packages:

Laravel (php):

JS plugins:

LaraLTE2 uses :

Page size optimization:

  • Using Laravel Mix, all CSS and JS are in minified to one file each.
  • LaraLTE2 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)

Note: If you're using Nginx check: server-configs-nginx

alt text

REST API

As you may see in included packages, I used ApiDocs to document all routes in api/v1 and controllers in Api namespace. You can check the docs at laralte2.bel4.com/api

Note: The API is protected by token, so when you send a request you should include APP-TOKEN in the header, this value will be compared to APP_TOKEN in .env file check this middleware

#FAQ

Create new CRUD

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) or, if you are a lazy developer like me, use a snippet and make only 2 changes
  • Duplicate resource/views/admin/categories folder to posts, make changes in index.php, create.blade.php, edit.blade.php

Move Image and file ?

To move images im using a helper function based on intervention/image and variables.php you can check full example in User.php

Do you need RTL support ?

  • Copy/paste "rtl-dependencies" into "dependencies" section
  • Change all pull-right to pull-left in default file and vise versa
  • Uncomment this line in webpack.mix.js
  • Run: yarn upgrade && npm run dev, you're ready to go ;)

alt text

Create new REST API

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/
  • That's all :)

Do you have question ?

Not hesitate, open new issue ;)

You might also like...
Laravel 7+ Content management framework
Laravel 7+ Content management framework

Sharp is not a CMS: it's a content management framework, a toolset which provides help to build a CMS section in a website, with some rules in mind: t

Laravel framework with integrated NuxtJs support, preconfigured for eslint, jest and vuetify.
Laravel framework with integrated NuxtJs support, preconfigured for eslint, jest and vuetify.

Laravel framework with integrated NuxtJs support, preconfigured for eslint, jest and vuetify.

A PHP framework for console artisans
A PHP framework for console artisans

This is a community project and not an official Laravel one Laravel Zero was created by, and is maintained by Nuno Maduro, and is a micro-framework th

Dynamic Framework :: A PHP starter kit for Noobs

A PHP starter kit for Noobs Author : Abdulbasit Rubeiyya The dynamic framework is not exactly a framework, but more of a starter kit for you, the thin

Simple skeleton for the PHP Slim framework

Simple skeleton for the PHP Slim framework

Here you have yet another framework for writing RESTful web services in PHP
Here you have yet another framework for writing RESTful web services in PHP

PHP-Rocker Here you have yet another framework for writing RESTful web services in PHP, jay! What sets this framework apart from many of the others is

Lumen PHP Framework (Starter Template)

This repository contains JWT Auth, Form Request, Route List, Redis, RabbitMQ and Mail packages. A ready auth system comes with the project

Very simple CRUD project, written in pure php. Designed as framework-agnostic as possible, and with basically no stack overflow if you can believe that
Very simple CRUD project, written in pure php. Designed as framework-agnostic as possible, and with basically no stack overflow if you can believe that

briefly simple CRUD pure php project for self improvement I try to make it purely in github - not only code, but any documentation (wiki), tasks (issu

Rest API boilerplate for Lumen micro-framework.
Rest API boilerplate for Lumen micro-framework.

REST API with Lumen 5.5 A RESTful API boilerplate for Lumen micro-framework. Features included: Users Resource OAuth2 Authentication using Laravel Pas

Comments
  • datatable conflict with turbolink

    datatable conflict with turbolink

    Hi,

    if you click left menu several times (let say "categories"), there will be an error "datatable is not function"

    solution i've tried : exclude turbolink in webpack.minx.js then compile it again

    opened by dev-chriss 1
  • added an automatic installer

    added an automatic installer

    To make it even easier, I added an automatic installer :smile_cat:

    Important You have to expose the setup.sh script to this url laralte2.bel4.com/setup

    opened by IOAyman 1
PHP Framework for building scalable API's on top of Laravel.

Apiato Build scalable API's faster | With PHP 7.2.5 and Laravel 7.0 Apiato is a framework for building scalable and testable API-Centric Applications

Apiato 2.8k Dec 31, 2022
Exemplary RealWorld backend API built with Laravel PHP framework.

Example of a PHP-based Laravel application containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld API spec.

Yury 66 Dec 31, 2022
A Web Artisan list of categorized OPEN SOURCE PROJECTS built with Laravel PHP Framework.

Laravel-Open-Source-Projects A Web Artisan list of categorized OPEN SOURCE PROJECTS built with Laravel PHP Framework. This repository includes a compr

Goodness Toluwanimi Kayode 833 Dec 26, 2022
Someline Starter is a PHP framework for quick building Web Apps and Restful APIs, with modern PHP design pattern foundation.

Someline Starter PHP Framework Tested and used in production by Someline Inc. Someline Starter is a PHP framework for quick building Web Apps and Rest

Someline 844 Nov 17, 2022
Base Laravel framework with a simple admin site/dashboard

Base Laravel Admin Just a basic Laravel 4.1 install with a admin site/dashboard using Bootstrap 3.0.3 For those (like me) who set up lots of small sys

Alex Dover 1 Nov 6, 2015
Berikut Adalah cara untuk melakukan CRUD di FrameWork Laravel, Silahkan Disimak

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

LilKhoo 1 Oct 23, 2021
A simple starter kit for using TypedCMS with the Laravel framework.

TypedCMS Starter Kit for Laravel Our stater kits are tailored solutions for each platform, unlike the simple API wrappers offered by other vendors. Th

TypedCMS 1 Nov 20, 2021
Laravel Framework 5 Bootstrap 3 Starter Site is a basic application with news, photo and video galeries.

Laravel Framework 5.1 Bootstrap 3 Starter Site Starter Site based on on Laravel 5.1 and Boostrap 3 Features Requirements How to install Application St

null 900 Dec 22, 2022
An implementation of Solder in Laravel's Lumen Framework.

LumenSolder What is LumenSolder? An implementation of Solder in Laravel's Lumen Framework. LumenSolder is an application to help compliment and scale

Technic Pack 3 Sep 16, 2020
Allows to connect your `Laravel` Framework translation files with `Vue`.

Laravel Vue i18n laravel-vue-i18n is a Vue3 plugin that allows to connect your Laravel Framework JSON translation files with Vue. It uses the same log

Francisco Madeira 361 Jan 9, 2023