Commit e93b2625 authored by unknown's avatar unknown

test models added

parent aed212a7
<?php
use Jenssegers\Mongodb\Model as Eloquent;
class Client extends Eloquent {
protected $collection = 'clients';
protected static $unguarded = true;
public function users()
{
return $this->belongsToMany('User');
}
}
\ No newline at end of file
...@@ -9,8 +9,6 @@ class User extends Eloquent implements UserInterface, RemindableInterface { ...@@ -9,8 +9,6 @@ class User extends Eloquent implements UserInterface, RemindableInterface {
protected $collection = 'users'; protected $collection = 'users';
protected $dates = array('birthday');
protected static $unguarded = true; protected static $unguarded = true;
public function books() public function books()
...@@ -28,6 +26,11 @@ class User extends Eloquent implements UserInterface, RemindableInterface { ...@@ -28,6 +26,11 @@ class User extends Eloquent implements UserInterface, RemindableInterface {
return $this->hasOne('Role'); return $this->hasOne('Role');
} }
public function clients()
{
return $this->belongsToMany('Client');
}
/** /**
* Get the unique identifier for the user. * Get the unique identifier for the user.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment