created at and updated at in pivot table code example
Example: laravel timestamps on pivot table
return $this->belongsToMany('TableModelClassName')->using('PivotTableModelClassName')->withTimestamps();
return $this->belongsToMany('TableModelClassName')->using('PivotTableModelClassName')->withTimestamps();