laravel get all where related is not null code example Example: check if value is not null in db laravel Model::whereNotNull('sent_at')