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';
| <? | |
| $music()-> | |
| filter(function ($value,$key) { | |
| if(strtolower($key) == 'music type' && strtolower($value) == 'jazz') | |
| { | |
| return true; | |
| } else { | |
| return false; | |
| } | |
| })-> |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| #################################################################################### | |
| ## ## | |
| ## 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. ## |
| // 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){ |