/Laramin

Laravel Admin Starter Set (not a package)

Primary LanguagePHP

Table of Contents generated with DocToc

Laramin

A Laravel starter Set Backend and Frontend based on Bootstrap 3 and clientside Bootstrapvalidator. I didnt knew how to work clean with Laravel, so I found my own way with the help of some packages. Now you can develop easy, clear and everybody will ever know what goes where..

Features

  • Default Theme on Bootstrap with easiest Client-side Validator
  • Clean structure with Modules, so everyone knows what goes where
  • Login, Password reset, Groups, Permission
  • Login Activation Mail, Password Reset Mail
  • Menu builder
  • Themes to overwrite default style

Installation

  • Git clone
  • Install Composer
  • Run Composer update
  • create new empty database in PhpMyAdmin or console "create database xy"
  • Setup Settings in laramin/app/config database.php and mail.php
  • Run php artisan mirgrate
  • Run php artisan migrate --package=cartalyst/sentry
  • Open laramin at localhost/laramin/public/user/login

Used Packages

Name Usage
Sentry Authenticatoin
themify Managing Themes
widget Theme Widgets
laravel-modules Cleaner structure
laravel-menu Managing menus
Ardent Validating
todo IDE code completion
notification Notifications

Maybe later:

Menu

Define you're Menu in app/menus.php

Add you're Menu Items:

$userMenuItems = function($userMenu) {
    $userMenu->add(trans('menu.dashboard'), array('route'  => 'dashboard'));
    $userMenu->add('Products',              array('route'  => 'dashboard'));
};

Create the Menu Instance in the if else Sentry::check block:

$userMenu = Menu::make('mainNav', $userMenuItems);

Add your Menu to the Array, cause this Array will be looped over, to add the active css class:

$memberMenus = array($adminMenu, $userMenu, $logoutMenu)

More information in the package description laravel-menu.

Modules

There are 4 Folders wich can contain modules, they are

- app/modules/backend  // for Admins
- app/modules/frontend // for registered Users
- app/modules/shared   // for Admins and Users
- app/modules/public   // for Guests

Split you're Application in modules inside these folders. For Example a User CRUD for the Admin goes in app/modules/backend/**user**

Module Folder contains
  • module.json file copy a existing or create a new one.
  • routes.php
  • folder "controllers" with YourController.php
Modules advanced
  • use app/config/packages/creolab/ to change settings for this module stuff
  • More information in the package description laravel-modules
Workflow when adding a new Module
  1. Module Folder
  2. Model
  3. Controller
  4. Route
  5. Menu
  6. View ->title etc..

Views

Normally Views are in app/views but because i thing almost everyone should have a cool Templating system to easy switch out the Views they have to go in app/themes/default/ these are at a higher priority than at app/views but you dont have to use my themes folder but if you do, it will just work.

More information in the package description themify

Clientside Validation

Never was easier, just add the HTML-Attributes you want for Validation just add to yoou're input tag for example data-bv-emailaddress="true" and you're done.

<input type="email" id="email" name="email" class="form-control" placeholder="{{ trans('login.email') }}" required autofocus
    data-bv-emailaddress="true"
    data-bv-stringlength="true"
    data-bv-stringlength-min="6"
    data-bv-stringlength-max="30"
>

More Information on Bootstrapvalidator

Widgets

If you have stuff that should be available in all Views ... TODO

Todos

  • read [vegibit] (http://vegibit.com/)
  • Look how to change Language
  • Highlight Current Page
  • Imporve active menu filtering when issue closed [laravel-menu] (lavary/laravel-menu#20)
  • Have a new branch where you can test features
  • Make a help gist for working with git.
  • Find a way to define the title for the pages..
  • Add Clientside Validation to all Forms / now only Login has it
  • Replace / route
  • Improve Language detection
  • Notification also when success not only on errors
  • CRUD User, Groups, Permissions
  • Find easy to use statistic Package / Plugin
  • Member can change password or mail-adress
  • Menu management in backend
  • Translate easy in backend
  • Create Artisan Command to create a Admin
  • Create Settings Module with - Block user on X login attempts
  • Move extended Sentry user Model, to Module folder
  • Find a good way to show stats and diagrams

Images

Laravel Starter Set Login Screen Laravel Starter Set Register Screen