Use `->has()` instead of `->get()`.
Also I don't see why the cookie is needed here.