French President Emmanuel Macron has officially accepted the resignation of his Prime minister Gabriel Attal.