I use Activity::cleanLog(); to clean up the database table, return true but not delete the logs of table.
/**
* [destroy description]
* @return [type] [description]
*/
public function destroy()
{
if (Activity::cleanLog()):
flash()->success('Logs excluídos com sucesso.');
else:
// Exibe a mensagem de sucesso
flash()->warning('Um erro ocorreu ao excluir os logs, tente novamente.');
endif;
// Redireciona para listagem de logs
return redirect()->route('painel.logs.index');
}
I use Activity::cleanLog(); to clean up the database table, return true but not delete the logs of table.