• This project
    • Loading...
  • Sign in

Зуев Егор / wiki.dev

Logo belkanton
Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • wiki.dev
  • app
  • Repos
  • UserRepo.php
  • Dan Brown's avatar
    Got standard form-based registration working · dec0cbb1
    dec0cbb1 Browse Files
    Dan Brown authored 2015-09-05 20:25:57 +0100
UserRepo.php 445 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?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);
    }
}