Laravel 4 Laravel PHP Eloquent
Laravel 4.1 one-to-one polymorphic relationships
To use one-to-one polymorphic relationships in Laravel 4.1 use the "morphOne" method in your models. For example: I have two tables, pages and products. I want to be able to add one featured image to each of these. The Product model would look like this: <?php class Product extends Eloquent { public function image() { return $this->morphOne('FeaturedImage', 'imageable'); } } The Page model would be: <?php class Page extends Eloquent { public function image() { return $this->morphOne('FeaturedImage', 'imageable'); } }