What is the function of latest() in laravel?
Example:
public function activity() { return $this->hasMany(\'App\\Activity\') ->with(
->latest() fetches the most recent set of data from the Database. In short, it sorts the data fetched, using the 'created_at' column to chronologically order the data.