Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
// convert 0..255 R,G,B values to binary string | |
RGBToBin = function(r,g,b){ | |
var bin = r << 16 | g << 8 | b; | |
return (function(h){ | |
return new Array(25-h.length).join("0")+h | |
})(bin.toString(2)) | |
} | |
// convert 0..255 R,G,B values to a hexidecimal color string | |
RGBToHex = function(r,g,b){ |
#################################################################################### | |
## ## | |
## gittyup() - Easily keep master in sync with upstream. ## | |
## ## | |
## Author: Evan Coury, http://blog.evan.pro/ ## | |
## URL: https://gist.github.com/1506822 ## | |
## ## | |
## This bash function is a simple shortcut for keeping your local (and public ## | |
## fork / origin remote) master branch up to date and in sync with the upstream ## | |
## master. To use gittyup(), simply drop this in your ~/.bashrc. ## |
{ | |
} |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<? | |
$music()-> | |
filter(function ($value,$key) { | |
if(strtolower($key) == 'music type' && strtolower($value) == 'jazz') | |
{ | |
return true; | |
} else { | |
return false; | |
} | |
})-> |
php artisan migrate:refresh --force; php artisan db:seed --force |
change | |
preg_match('/^([a-z]+)\.\1ID$/i', $args[0] | |
to | |
preg_match('/^(.*)ID$/i', $args[0] |
I hereby claim:
To claim this, I am signing this object: