How can I use beginCache() and have the dependency based on model’s modified time?
I’ve tried
'varyByExpression' => function () { return $data->modified; }
and received this error:
Undefined variable: data
How can I use beginCache() and have the dependency based on model’s modified time?
I’ve tried
'varyByExpression' => function () { return $data->modified; }
and received this error:
Undefined variable: data