GithubHelp home page GithubHelp logo

od3n / laravel-4-bootstrap-3-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 58bits/laravel-4-bootstrap-3-starter

0.0 3.0 0.0 469 KB

Laravel 4 Bootstrap 3 Starter Site

PHP 94.77% CSS 2.06% JavaScript 3.17%

laravel-4-bootstrap-3-starter's Introduction

#Laravel 4 Bootstrap 3 Starter Site

This is a cut-down version of the excellent Laravel 4 Bootstrap Starter Site

I created this starter app as I needed a simple framework for an internal database-backed Web application with users, roles, and of course Laravel - but no public facing Web pages.

I also wanted to roll my sleeves up and experiment with Laravel and Bootstrap.

I really like what Andrew and the other contributors have done with Laravel 4 Bootstrap Starter Site, but there were also a couple of things I wanted to do differently.

Here's a description of the differences from the original starter site:

Differences

  • I've removed Basset (for the moment at least) and so there is no asset management system. Jason Lewis' asset management package is superb - but this starter app will be used to create management and utility applications, with little custom styling and JavaScript. In other words, once forms, layout, and the Bootstrap styles have been applied, there won't be any further changes to asset files and so an asset management system isn't as important to the application as it would be for a large public facing Web site. If projects evolve - then I may put it back.

  • I've used the compiled Bootstrap 3 .css and .js files.

  • I've kept the excellent Bilal datatables package (although there are still a few wrinkles to iron out with table formatting in Bootstrap 3).

  • I've removed Colorbox pop-ups and followed a controller/view pattern that I've used on Rails applications in the past. I'm not a big fan of popping up windows for forms or CRUD operations - in particular for delete operations. All controllers (well all except the UserController.php) uses the Route::resource RESTful controller methods, with the addition of a delete method that shows the record to be deleted before it's deleted/destroyed. Take a look at routes.php, and WidgetController.php for examples.

  • Following from the contoller pattern above, views also follow a fixed pattern, with _details.blade.php and _form.blade.php used for both show, and delete as well as create and update. Also look at the Widget.php model and views for examples.

  • I've created a simplified Bootstrap 3 Navbar - with an Admin dropdown menu that appears if you login as admin.

  • I've continued to use Confide for authentication and Entrust for authorization - although still digging here.

##Tests

I've created sample PHP-Unit and Mockery-based tests in tests/controllers/WidgetControllerTest.php. These are contoller tests, using Mockery to mock the Widget model - meaning that no database connection is required for these tests.

Take a look at Testing Laravel Controllers for Jeffrey Way's approach to testing controllers.

For model testing, take a look at Testing Like a Boss in Laravel: Models

##Screenshots

Home Users Widgets Login Widget

##Requirements and Installation

Clone this repository git clone [email protected]:58bits/laravel-4-bootstrap-3-starter.git myproject

And then follow the excellent instructions over at Laravel 4 Bootstrap Starter Site.

Note: substitue 'laravel' for 'myproject', or whatever project directory you created when you cloned this repo. You can also skip the 'Build Assests' Step 9 (since we're not using Basset).

Once the migrations are run and you've seeded the database - Admin:admin, User:user accounts will be created as well as default permissions.

The current app/config/local/database.php file expects a MySQL database connection with a database named: lv4bs3_www, user: lv4bs3 and password: test. Update these to suit your own dev setup.

You can use the local PHP server to run the application.

php artisan serve --port=4000

The app/config/local/mail.php file has been set to 'pretend' => true - so no SMTP settings are required.


License

This is free software distributed under the terms of the MIT license

laravel-4-bootstrap-3-starter's People

Contributors

jaggy avatar od3n avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.