- name
- intent
- problem/motivation
- solution
- structure
- code
- consequences & trade-offs
| // Source: https://gist.github.com/luetkemj/2023628 | |
| <?php | |
| $args = array( | |
| //////Author Parameters - Tham số lấy bài viết theo tác giả | |
| //http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters | |
| 'author' => '1,2,3,', //(int) - Các ID tác giả cần lấy bài viết (thêm dấu - vào để loại trừ tác giả, ví dụ: -14, -20) | |
| 'author_name' => 'luetkemj', //(string) - Lấy bài viết dựa theo tên nick name của tác giả | |
| 'author__in' => array( 2, 6 ), //(array) - Lấy bài dựa theo ID của tác giả | |
| 'author__not_in' => array( 2, 6 ), //(array)' - Các ID của tác giả không muốn lấy bài |
| <?php | |
| /** | |
| * Abstract class which has helper functions to get data from the database | |
| */ | |
| abstract class Base_Custom_Data | |
| { | |
| /** | |
| * The current table name | |
| * | |
| * @var boolean |
| <section class="slider"> | |
| <div class="flexslider"> | |
| <ul class="slides"> | |
| <li><img src="http://imgur.com/..." alt=""></li> | |
| <li><img class="lazy" data-src="http://imgur.com/..." alt=""></li> | |
| <li><img class="lazy" data-src="http://imgur.com/..." alt=""></li> | |
| <li><img class="lazy" data-src="http://imgur.com/..." alt=""></li> | |
| <li><img class="lazy" data-src="http://imgur.com/..." alt=""></li> | |
| </ul> | |
| </div> |
| /*! | |
| * Simple JavaScript Inheritance | |
| * By John Resig http://ejohn.org/ | |
| * MIT Licensed. | |
| * | |
| * Extended by Jonathon Byrd to include function hooks | |
| * https://gist.github.com/Jonathonbyrd/724083 | |
| * | |
| * Don't forget your Shims! | |
| * https://github.com/kriskowal/es5-shim/blob/master |
| /** | |
| * Minimum set up for a revealing module pattern jQuery plugin | |
| * | |
| * This is a bare plugin that uses the revealing module pattern to attach | |
| * public and private vars and methods to a jQuery selector. | |
| * | |
| * Example: | |
| * | |
| * $('#menu').collapsible().init(); | |
| * $('#menu').collapsible().open(); |
| var app = (function(w, d){ | |
| var myPrivateVariable = "My private content"; | |
| var __private = { | |
| cache : function(){ | |
| this.link = d.querySelector('.link-item'); | |
| } | |
| bind : function(){ | |
| this.link.addEventListener('click', this.handleClick, false); | |
| }, |
| <!-- contactform.php --> | |
| <div class="cf" id="cf"> | |
| <form action="javascript:void(0);"> | |
| <div><input type="text" name="name" placeholder="Name"/><span class="error"></span></div> | |
| <div><input type="text" name="email" placeholder="Email"/><span class="error"></span></div> | |
| <div><textarea name="message" placeholder="Message"></textarea><span class="error"></span></div> | |
| <div><button type="submit">Submit</button> <span class="loader"></span></div> | |
| </form> | |
| </div> |
| (function (window, document, $, undefined) { | |
| var possibleCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
| var defaults = { | |
| selector: "#captcha", | |
| text: null, | |
| randomText: true, | |
| randomColours: true, |
#Laravel 5 Simple ACL manager
Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.
If the user has a 'Root' role, then they can perform any actions.
Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php