Book.php 390 Bytes
Newer Older
Jens Segers's avatar
Jens Segers committed
1 2 3 4 5 6 7 8 9
<?php

use Jenssegers\Mongodb\Model as Eloquent;

class Book extends Eloquent {

	protected $collection = 'books';
	protected static $unguarded = true;
	protected $primaryKey = 'title';
Jens Segers's avatar
Jens Segers committed
10 11 12 13 14

    public function author()
    {
        return $this->belongsTo('User', 'author_id');
    }
15 16 17 18 19 20

    public function mysqlAuthor()
    {
        return $this->belongsTo('MysqlUser', 'author_id');
    }
}