When I use `->latest()` in my query builder in Laravel it returns the latest query that matches other conditions but I want to constrain my query to only the latest object + my conditions, rather than select the entry that conforms to my conditions and is the latest.

So for example if there is this table:

| id | name | created\_at |
| --- | --- | --- |
| 1 | James | 2020-10-01 |
| 2 | Jack | 2020-10-02 |
| 3 | Jeff | 2020-10-03 |

`Student::where('id', 2)->latest()->first();` returns an instance of student 'Jack'.

But I want it to return `null`, as there is no student with `id` of 2, which is the also latest.

Put another way: It should only ever return 'Jeff' or `null` as that is the latest entry.

How would I perform this query?

EDIT: I'm putting in the `created_at` column to make it clear that I want the query to be limited by the `latest()` condition + some other condition (in this case `id`).