Skip to content

Instantly share code, notes, and snippets.

@lorvent
lorvent / eloquent.md
Created February 17, 2014 10:49 — forked from msurguy/eloquent.md

Conventions:

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';