I am using the below eloquent:
Book::selectRaw("name")
->where($bookWheres)
->with(['chapter'=>function ($query) use($chapterWheres)
{
$query->where($chapterWheres);
}])
->get()->dd();
To set the $bookWheres / $chapterWheres I am pusing the array ['xx', '>=', '5']. However for the $chapterWhere I also need to push similar to ['timestamp', 'is', 'null'] since it is going to check if a timestamp column is null/empty.
->whereNull('timestamp') would usually work. However the where clause ['timestamp', 'is', 'null'] is a filter so it could just as well be not null, >= or <=.
Is it possbile to push "is null" into the array?
Laravel 7.