public function firstBy(array $where = [], array $with = [])
    {
        $query = $this->make($with);

        $query = $this->applyWhere($query, $where);

        return $query->first();
    }
public function firstBy(array $where = [], array $with = [])
    {
        $query = $this->make($with);

        $query = $this->applyWhere($query, $where);

        return $query->first();
    }
public function firstBy ( array $ where = [ ] , array $ with = [ ] ) { $ query = $ this -> make ( $ with ) ; $ query = $ this -> applyWhere ( $ query , $ where ) ; return $ query -> first ( ) ; }
Return the first record querying input parameters.
Return null if no record is found.

@param array $where
@param array $with

@return mixed
Return the first record querying input parameters . Return null if no record is found .