Download the PHP package viu/viu-laravel without Composer

On this page you can find all versions of the php package viu/viu-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package viu-laravel

viu-laravel

[![Packagist Version](https://img.shields.io/packagist/v/viu/viu-laravel.svg)](https://packagist.org/packages/viu/viu-laravel) [![PHP Version](https://img.shields.io/packagist/php-v/viu/viu-laravel.svg)](https://packagist.org/packages/viu/viu-laravel) [![License](https://img.shields.io/github/license/viu-team/viu)](https://github.com/viu-team/viu/blob/main/LICENSE) ![PHP](https://img.shields.io/badge/PHP-8.1%2B-777BB4?style=for-the-badge&logo=php&logoColor=white) ![Laravel](https://img.shields.io/badge/Laravel-10%2F11%2F12-FF2D20?style=for-the-badge&logo=laravel&logoColor=white) ![Monolog](https://img.shields.io/badge/Monolog-3.x-00A98F?style=for-the-badge&logo=php&logoColor=white)

Laravel SDK para o sistema Viu de centralização de logs

✨ Quer ver logs? → Joga no Viu. Viu?

viu-laravel integra o sistema de logging nativo do Laravel com a plataforma Viu, oferecendo:

🚀 Features


📦 Instalação

O service provider é registrado automaticamente via auto-discovery do Laravel.

Opcional — Transport Kafka:


⚙️ Configuração

1. Publicar o arquivo de configuração

Isso cria config/viu.php no seu projeto.

2. Variáveis de ambiente (.env)


🎯 Formas de uso

1. Canal Monolog (recomendado)

Adicione o canal viu em config/logging.php:

Uso em código:

Sobrescrever o nível mínimo por canal:


2. Facade Viu


3. Injeção de dependência


🔗 Middleware — Correlation ID

O ViuCorrelationMiddleware propaga automaticamente o Correlation ID e Trace ID entre requisições, garantindo rastreabilidade ponta-a-ponta nos logs.

Laravel 10 — app/Http/Kernel.php

Laravel 11/12 — bootstrap/app.php

Comportamento

Cenário Comportamento
Header X-Correlation-ID presente Usa o valor recebido
Header ausente Gera um novo UUID v4
Header X-Trace-ID presente Usa como Trace ID
X-Trace-ID ausente Usa o Correlation ID como Trace ID

Headers adicionados na response:


🚀 Modo Kafka (alternativo)

Para ambientes de alta performance onde o envio direto ao Kafka é desejado:

O modo HTTP é recomendado para a maioria dos casos por sua simplicidade e segurança (não expõe Kafka diretamente).


📋 Configuração completa


🧩 Payload enviado ao backend


🧪 Flush manual (queue workers / jobs)

Em processos de longa duração (queue workers, Octane, etc.), chame flush() após cada job para garantir o envio dos logs pendentes:

Via Facade:


🧪 Testes


📄 Licença

MIT — veja LICENSE.


All versions of viu-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/log Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
monolog/monolog Version ^3.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package viu/viu-laravel contains the following files

Loading the files please wait ...