Illuminate\Database\Query\Builder::whereNotNull PHP Method

whereNotNull() public method

Add a "where not null" clause to the query.
public whereNotNull ( string $column, string $boolean = 'and' ) : Builder | static
$column string
$boolean string
return Builder | static
    public function whereNotNull($column, $boolean = 'and')
    {
        return $this->whereNull($column, $boolean, true);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Add a "where" clause to the given query.
  *
  * @param  \Illuminate\Database\Query\Builder $query
  * @param  string $key
  * @param  string $extraValue
  * @return void
  */
 protected function addWhere($query, $key, $extraValue)
 {
     if ($extraValue === 'NULL') {
         $query->whereNull($key);
     } elseif ($extraValue === 'NOT_NULL') {
         $query->whereNotNull($key);
     } else {
         $query->where($key, $extraValue);
     }
 }
All Usage Examples Of Illuminate\Database\Query\Builder::whereNotNull