timestamp in null in pivot table if use sync method laravel code example
Example: laravel timestamps on pivot table
return $this->belongsToMany('TableModelClassName')->using('PivotTableModelClassName')->withTimestamps();
return $this->belongsToMany('TableModelClassName')->using('PivotTableModelClassName')->withTimestamps();