Q:

Laravel eloquent recors newer then 5 minutes

This may look like a doublepost but it isn't.
I am trying to see if a user has posted a topic in the past 5 minutes and i tried million codes to check but somehow my code always counts 1 or more.
This is the solution i currently have:
public function allowedToPostTopic() {
    $count = Topic::where([
        ['user_id', '=', $this->id],
        ['created_at', '>', \Carbon\Carbon::now()->subMinutes($this->role->topic_delay)]
    ])->count();

    if ($count == 0)
        return true;

    return false;
}

$this->role->topic_delay = 5 i know that for sure (also tested this with var_dumb)
i tried to change > in < since it's confusing me and i tried lots of other ways like:
 NOW() - INTERVAL 5 MINUTE

But that doesn't work either :(
What am i doing wrong here?

A:

I would suggest the following for troubleshooting;

Enable query logging, grab the result of the query and try running it in your database application, tamper with it until you get the correct results
Try outputting carbon as a datetime stamp with the format function
Verify the data in the db is correct
Step through it with xdebug if all else fails and use the evaluator 

I wouldn't expect it to be a matter of setting the date property on the model because I'm pretty sure that's alreAdy handled, but might be worthwhile checking over the model too to make sure there isn't anything weird there. 

