For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
	Schema::create('posts', function(Blueprint $table) {
		$table->increments('id');
		$table->string('title');
		$table->text('body');| // only add one force sell product to the cart no matter how many of the original product are added | |
| function my_wc_force_sell_add_to_cart_product( $product ){ | |
| $product['quantity'] = 1; | |
| return $product; | |
| } | |
| add_filter( 'wc_force_sell_add_to_cart_product', 'my_wc_force_sell_add_to_cart_product' ); | |
| // when a synced force sell product is updated always set it to 1 | |
| function my_wc_force_sell_update_quantity( $quantity, $product ){ | |
| return 1; | 
| function change_job_listing_slug( $args ) { | |
| $args['rewrite']['slug'] = _x( 'careers', 'Job permalink - resave permalinks after changing this', 'job_manager' ); | |
| return $args; | |
| } | |
| add_filter( 'register_post_type_job_listing', 'change_job_listing_slug' ); | 
For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
	Schema::create('posts', function(Blueprint $table) {
		$table->increments('id');
		$table->string('title');
		$table->text('body');| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management | 
| <ul class="events"> | |
| <?php | |
| $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; | |
| $atts = array( | |
| 'paged' => $paged, | |
| 'title' => NULL, | |
| 'limit' => 100, | |
| 'css_class' => NULL, | |
| 'show_expired' => FALSE, | |
| 'month' => NULL, | 
This is a WORK IN PROGRESS intended for fleshing out and feedback
It's very common for people to be unhappy with how a WordPress plugin adds front end resources to their site. If a plugin needs CSS, the plugin will add a <link> element to that CSS. If the plugin needs JavaScript, it will add a <script> to that JavaScript.
Plugins do this because it works. It's damn important for a WordPress plugin to work, even in adverse conditions. They rightfully want good ratings and little customer support.
But this comes at the cost of additional HTTP requests. In optimizing front end performance of a site, reducing the number of HTTP requests is a huge thing. Front end developers want to decide and control how front end resources are being handled, and WordPress plugins don't typically make this easy on them.
| <?php | |
| // Manually create entries and send notifications with Gravity Forms | |
| $form_id = 10; | |
| // add entry | |
| $entry = array( | |
| "form_id" => $form_id, | |
| "1" => "Entry for field ID 1", | 
| /** | |
| * Changes value to past tense. | |
| * Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc. | |
| * http://jsfiddle.net/bryan_k/0xczme2r/ | |
| * | |
| * @param {String} value The value string. | |
| */ | |
| Vue.filter('past-tense', function(value) { | |
| // Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing | |
| var vowels = ['a', 'e', 'i', 'o', 'u']; | 
| afghanistan : Afghanistan | |
| albania : Albania | |
| algeria : Algeria | |
| american_samoa : American Samoa | |
| andorra : Andorra | |
| angola : Angola | |
| anguilla : Anguilla | |
| antigua_and_barbuda : Antigua and Barbuda | |
| argentina : Argentina | |
| armenia : Armenia | 
#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