Skip to content

viniciusferreira/laravel-5-skeleton

 
 

Repository files navigation

##Laravel 5 Skeleton App This is a basic Laravel 5 App starter kit setup so that you can get to developing right away. It includes the the following ready to go:

  1. User roles and permissions
  2. Sass processing and concatenating (gulp)
  3. JS concatenation (gulp)
  4. Bower
  5. Bootstrap 3, jQuery, jQuery UI, and fontawesome
  6. Basic front end and admin layouts

That's it! Nothing you don't need or wouldn't use in nearly every project, just a a clean structure so you can get to building right away.

This starter kit is mostly for myself to use as needed but if anyone else finds it useful, please feel free to use and improve on it.

##Installation Make sure you have composer installed globally and then run the commands below.

git clone https://github.com/AlexBrandes/laravel-5-skeleton.git myproject;
cd myproject;
sudo composer install;
php artisan key:generate;

##Database Setup The app comes configured to communicate with a local mysql database called laravel using un: local and no password. You can change this easily by editing config/database.php

It also comes ready to use redis out of the box. The app is setup to use redis defaults on localhost. Here's a quick overview of Redis installation. The most basic way is shown below.

#####On OSX:

brew install redis-server; 
redis-server;

#####On Ubuntu:

apt-get install redis-server;
redis-server;

##Migration and Seeding Now that the database is setup we're ready to create out tables using migrations.

php artisan migrate;
php artisan db:seed;

Check out the seeder classes in database/seeds for more information about the test users and roles that are set up. You'll have 3 initial roles available (user, admin, super_admin) and default users set for each so that you can log in using email: @example.com and pw:. For example, to log in as admin use email: admin@example.com and pw: admin.

##Assets Install the default assets using bower.

bower install;
gulp;

The app is set up with Sass and js in logical groupings and then concatenated by gulp. Sass files are in resources/sass and included in the app.scss file. Gulp will process these files into the public/build/css directory and then the versioned css file is included in the app layout. JS in resources/js is also concatenated and moved to public/build/js and a versioned app.js is included in the app layout.

##App Directory I've left everything as is in the app directory with the exception of a few things. I've moved all models into app/db to keep them logically separated from the rest of the app code. I've also added a "CheckPermissions" middleware file that allows you to define permissions requirements at the route level. Just include permissions in the middleware key of the route and add a permissions key with an array of required permissions.

##Start Using It

php artisan serve;

Then navigate to localhost:8000 to get started. Enjoy!

##License Consider this beerware. Share with anyone that might find it useful and if you like it, buy me a beer if we ever happen to meet in person. Laravel is under an MIT license.

About

Quickstart skeleton app for Laravel 5 with ACL permissions system, sass, and js setup with bower and gulp. Also includes Bootstrap 3, jQuery, and FontAwesome.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.0%
  • CSS 5.1%
  • PHP 4.9%