From 153c2837f304ec6a84d5551f5bb00861d816d34a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 5 Jan 2013 13:36:02 -0600 Subject: [PATCH] Update docs. --- laravel/documentation/database/eloquent.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/laravel/documentation/database/eloquent.md b/laravel/documentation/database/eloquent.md index f1643717..4269bf19 100644 --- a/laravel/documentation/database/eloquent.md +++ b/laravel/documentation/database/eloquent.md @@ -36,12 +36,14 @@ ## Conventions - Each table should have a primary key named **id**. - Each table name should be the plural form of its corresponding model name. -Sometimes you may wish to use a table name other than the plural form of your model. No problem. Just add a static **table** property your model: +Sometimes you may wish to use a table name other than the plural form of your model, or a diffrent primary key column. No problem. Just add a static **table** property your model: class User extends Eloquent { public static $table = 'my_users'; + public static $key = 'my_primary_key'; + }