Skip to content

Instantly share code, notes, and snippets.

@hernandev
Created January 31, 2014 17:29
Show Gist options
  • Save hernandev/8737717 to your computer and use it in GitHub Desktop.
Save hernandev/8737717 to your computer and use it in GitHub Desktop.
<?php
class Foo extends Eloquent {
protected $table = 'foo';
public function Bar()
{
// Notice the bar class name now is lowercase
return $this->belongsTo('bar');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment