adspace
How to use where null and where not null eloquent query in laravel?
Answer Posted / Kumud Bharti
"In Laravel Eloquent, you can use 'whereNull()' and 'whereNotNull()' methods to filter records based on whether a column is null or not. Here's an example:
```php
$recordsWithNullColumn = Model::whereNull('column_name')->get();
$recordsWithNotNullColumn = Model::whereNotNull('column_name')->get();
```
"n
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers