public function findBy($attribute, $value, $attributes = ['*'])
    {
        return $this->executeCallback(get_called_class(), __FUNCTION__, func_get_args(), function () use ($attribute, $value, $attributes) {
            return $this->prepareQuery($this->createModel())->where($attribute, '=', $value)->first($attributes);
        });
    }
public function findBy($attribute, $value, $attributes = ['*'])
    {
        return $this->executeCallback(get_called_class(), __FUNCTION__, func_get_args(), function () use ($attribute, $value, $attributes) {
            return $this->prepareQuery($this->createModel())->where($attribute, '=', $value)->first($attributes);
        });
    }
public function findBy ( $ attribute , $ value , $ attributes = [ '*' ] ) { return $ this -> executeCallback ( get_called_class ( ) , __FUNCTION__ , func_get_args ( ) , function ( ) use ( $ attribute , $ value , $ attributes ) { return $ this -> prepareQuery ( $ this -> createModel ( ) ) -> where ( $ attribute , '=' , $ value ) -> first ( $ attributes ) ; } ) ; }
Find an entity by one of it's attributes.

@param string $attribute
@param string $value
@param array  $attributes

@return \Illuminate\Database\Eloquent\Model
Find an entity by one of it s attributes .