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 | |
| # log into your server | |
| ssh root@[server ipaddress] | |
| # change root password | |
| passwd | |
| # update all packages and operating system | |
| apt-get update && apt-get --yes upgrade |
| #!/bin/sh | |
| # Import a remote database into a local database | |
| # ---------------------------------------------- | |
| # | |
| # Based on http://danherd.net/quick-script-synchronise-from-a-remote-expressionengine-database/ | |
| # | |
| # Don’t forget chmod +x to make the script executable. | |
| # | |
| # Change the extension to .command to run the script directly from OS X Finder. |