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';
| <?php | |
| trait Gettable { | |
| /** | |
| * Retrieve private attributes. | |
| * Attributes should be protected | |
| * so they cannot be *set* arbitrarily. | |
| * This allows us to *get* them as if they | |
| * were public. |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Tournament Bracket Generator</title> | |
| <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> | |
| <script src="http://underscorejs.org/underscore-min.js"></script> | |
| <script> | |
| $(document).on('ready', function() { | |
| var knownBrackets = [2,4,8,16,32], // brackets with "perfect" proportions (full fields, no byes) |
| type ApacheLogRecord struct { | |
| http.ResponseWriter | |
| ip string | |
| time time.Time | |
| method, uri, protocol string | |
| status int | |
| responseBytes int64 | |
| elapsedTime time.Duration | |
| } |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.