laravel/framework — pull request #5701 by nadavvin (2014-09-10 14:27:25+00:00)
Title: setKeyName in Eloquent/Model: Set the primary key for the model.

There are 'set' methods defined for table name and other properties, but there are no 'set' for the primary key.

This method will be useful in models of tables representing many-to-many relationship, that have foreign keys attributes but doesn't have primary key defined. Also, it can be used to create custom models which are not inherited from Eloquent/Model.