BookStack/app/Repos/UserRepo.php

29 lines
445 B
PHP
Raw Normal View History

2015-09-04 16:16:58 +00: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();
}
public function getById($id)
{
return $this->user->findOrFail($id);
}
2015-09-04 16:16:58 +00:00
}