2015-09-04 18:16:58 +02:00
|
|
|
<?php namespace Oxbow\Repos;
|
|
|
|
|
|
|
|
|
|
|
|
use Oxbow\User;
|
|
|
|
|
|
|
|
class UserRepo
|
|
|
|
{
|
|
|
|
|
|
|
|
protected $user;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* UserRepo constructor.
|
|
|
|
* @param $user
|
|
|
|
*/
|
|
|
|
public function __construct(User $user)
|
|
|
|
{
|
|
|
|
$this->user = $user;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function getByEmail($email) {
|
|
|
|
return $this->user->where('email', '=', $email)->first();
|
|
|
|
}
|
2015-09-05 21:25:57 +02:00
|
|
|
|
|
|
|
public function getById($id)
|
|
|
|
{
|
|
|
|
return $this->user->findOrFail($id);
|
|
|
|
}
|
2015-09-04 18:16:58 +02:00
|
|
|
}
|