Download the PHP package taecontrol/larvis without Composer

On this page you can find all versions of the php package taecontrol/larvis. 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 larvis

The bridge for Laravel apps to work with MoonGuard Plugin or Krater

Larvis Image

Larvis is a PHP package for Laravel that allows a Laravel app to send and report information to MoonGuard or Krater.

Currently, you can use Larvis in the following scenarios:

What is MoonGuard?

MoonGuard is an open source Filament plugin that aims to provide utilities to monitor your Laravel apps in production.

For more information visit the MoonGuard official site.

What is Krater?

Krater is a desktop application for debugging Laravel apps, it provides an intuitive and friendly interface to debug exceptions, queries, requests and more.

For more information visit the Krater official site.

Installation

You can install Larvis via composer with the following command:

After installation, we recommend publishing the configuration to customize Larvis' behavior according to your needs.

Great! Larvis is now installed in your project, and the configuration file should be available at config/larvis.php. At this point, you need to decide how Larvis should operate and behave.

You can configure it to work in Production with MoonGuard and report every exception and server metric from your application once released and deployed to the world, if you want to use Larvis locally to debug your Laravel application, you can set it up to work with Krater. In summary, Larvis can operate in two ways:

[!IMPORTANT]
Larvis default behavior is to work with Krater.

Setup Larvis to work with MoonGuard

To allow Larvis to capture and report exceptions, it is necessary to add three variables on the app .env file:

Variable Description
MOONGUARD_DOMAIN The domain where the MoonGuard is located.
MOONGUARD_SITE_API_TOKEN The app site API Token.
KRATER_DEBUG Enables or disables Larvis Debug Mode with Krater.

You can obtain the API token at the MoonGuard admin panel (Site administration). This token is unique to your site and is used to authenticate the site in every request to MoonGuard.

Image

No extra steps needed. With this setup Larvis can report your app exceptions to MoonGuard.

[!IMPORTANT]
Reporting exceptions to MoonGuard only works when the app environment is production.

Setup Larvis to work with Krater

Larvis default behavior is to work and debug with Krater. We have develop several utilities to catch and report data as messages, exceptions, queries and requests easily to Krater.

Watchers

Watchers are components that monitor and record different aspects of your application, such as requests, database queries, and exceptions. Larvis includes the following watchers:

  1. QueryWatcher: Detects and reports all queries that are made to the app database.
  2. ExceptionWatcher: Detects and reports any exception that have occurred in the app.
  3. RequestWatcher: Detects and report any request that have been made to the app.

All the watchers can be enabled or disabled from the Larvis configuration file.

[!IMPORTANT]
RequestWatcher and QueryWatcher are not compatible with MoonGuard.

Sending Messages to Krater

Larvis understand a message as the data you want to send to Krater, similar to when you use dd($arg) in your projects. In this case, Larvis and Krater use different strategies to format and make the debugging of the data flexible.

There is a global function called larvis($args) that allows you to send any type of data to Krater as a message. Here are some examples of how to use it:

Sending an array of strings

Sending a string

Sending an array of numbers

Sending a null value

Sending a collection

Sending an object

Watching and Sending Queries to Krater

In order to watch and send queries to Krater the QueryWatcher must be enabled, as we mentioned earlier, this watcher allows you to detect and report all queries that are made to the app database.

QueryWatcher can be enabled in Larvis configuration:

To record isolated queries, you can use the startQueryWatch() and stopQueryWatch() as follow:

Watching and Sending Exceptions to Krater

In order to watch and send exceptions to Krater the ExceptionWatcher must be enabled, this watcher is enabled by default.

Watching and Sending Request to Krater

In order to watch and send request to Krater the RequestWatcher must be enabled, is enables the ability to monitor HTTP requests in your Laravel application and send the relevant information to Krater.

Readers

A reader is a utility we have developed to process PHP objects in a practical way. Its versatility allows you to specify the properties that need to be processed from an object, you can modify this in the Larvis configuration.

Currently, this property specification is only compatible with the following Illuminate classes:

In the configuration file, you will find something like:

Here you can modify the properties you need to debug an Illuminate model according to your preferences.

You can do the same with an Collection from Illuminate:

Commands

Larvis allows you to execute commands for different purposes.

CheckHardwareHealthCommand

This command is useful to obtain the CPU load, RAM memory usage and disk usage (disk consumption and total disk capacity) from the server where your application is running and then be sent to MoonGuard Filament Plugin through HTTP protocol. This command is intended to be used with the Laravel Console Scheduler, register it in your console/Kernel.php file:

[!NOTE]
We recommend a frequency of 5 minutes or less

Krater: Debugging Evolved

MoonGuard: Krater Image

Krater is a lightweight, cross-platform application that revolutionizes Laravel app debugging on your next major project.

MoonGuard: The Software Creator's Journey [Book]

The MoonGuard development team has written a book named "MoonGuard: The Software Creator's Journey." In this book, we document and explain the entire process of creating, developing, publishing MoonGuard as a Filament Plugin. Every hard corner and special tricks were registered on this book, you can obtain your own digital copy here.

MoonGuard: Book

Contributing

Thanks for consider contributing to Larvis, The contribution guide can be found in the MoonGuard documentation.

Credits

License

The Larvis package is open-sourced software licensed under the MIT license.


All versions of larvis with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
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 taecontrol/larvis contains the following files

Loading the files please wait ....