I hereby claim:
- I am xethron on github.
- I am bbreyten (https://keybase.io/bbreyten) on keybase.
- I have a public key ASA4IcjsjjQxA_1Nm5_f8ORnjw94ItRJ7hQgE0kd-xbtOgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
// We had a relationship similar to the one below: | |
public function currentParameters() | |
{ | |
return $this->hasOne('Parameter')->where('active_date', '<=', Carbon::now())->orderBy('active_date', 'DESC'); | |
} | |
// This pretty much got the last active parameter for a specific model. | |
// However, sometimes we wanted to see into the future/past, which wasn't entirely possible. | |
// Especially if you wanted to eagerload it. |
There are many tools one can use to improve productivity, however, its sometimes the simplest of changes/configuration to your existing tools that makes the most impact.
As an example: Bash Scripts. If you're writing more than 15 characters in bash multiple times a day with random IP's and tags to remember, write a simple shorthand function. Examples:
scp -P 5555 /some/path/to/file.php [email protected]:/var/www/project/current/some/path/to/file.php
, I have a little script: scp{projectname} /some/path/to/file.php
. It already knows our server details, and the path relative to the project (both locally for autocompletion, and on the server). It also sends out a HipChat notification that the certain file has been overwritten, so I don't have to worry about keeping the team in the loop. (Yes, I do push files directly to our live production server from time to time, sue me)Also, being 100% comfortable with your IDE is extremely important. Set i
<?php //app/libraries/MultiUserProvider.php | |
use Illuminate\Auth\UserProviderInterface, | |
Illuminate\Auth\UserInterface, | |
Illuminate\Auth\GenericUser; | |
class MultiUserProvider implements UserProviderInterface { | |
protected $providers; |
var $j = jQuery.noConflict(); | |
document.observe('dom:loaded', function() { | |
var isZA_B; | |
var isZA_S; | |
var setShipping = false; | |
function setFields (shipto) { | |
$$("label[for='" + shipto + ":region_id']")[0].addClassName('required'); |
<?php | |
function custom_override_checkout_fields( $fields ) { | |
// Get global WooCommerce Object | |
global $woocommerce; | |
// Get the shipping label | |
$shipping_label = $woocommerce->cart->shipping_label; | |
There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.
I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing: