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';
| #!/bin/bash | |
| # | |
| # Ansible role test shim. | |
| # | |
| # Usage: [OPTIONS] ./tests/test.sh | |
| # - distro: a supported Docker distro version (default = "centos7") | |
| # - playbook: a playbook in the tests directory (default = "test.yml") | |
| # - cleanup: whether to remove the Docker container (default = true) | |
| # - container_id: the --name to set for the container (default = timestamp) | |
| # - test_idempotence: whether to test playbook's idempotence (default = true) |
| [Unit] | |
| Description=consul agent | |
| Requires=network-online.target | |
| After=network-online.target | |
| [Service] | |
| EnvironmentFile=-/etc/sysconfig/consul | |
| Environment=GOMAXPROCS=2 | |
| Restart=on-failure | |
| ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| #!/bin/bash | |
| # Setup a debian based vagrant machine | |
| TO_CLEAN_PKGS=() | |
| nullify_free_space() { | |
| echo 'clearing free space' | |
| dd if=/dev/zero of=/EMPTY bs=1M | |
| rm -f /EMPTY | |
| } |