Download the PHP package wachey/api without Composer

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

Wachey API PHP Client

The Wachey\Api\Report class provides a simple interface for reporting errors to the Wachey API. This class can be used in both Laravel and non-Laravel environments, with support for loading environment variables from a .env file located in the public_html folder.

Features

Installation

  1. Install via composer typing composer require wachey/api
  2. Add the Wachey\Api\Report class to your PHP project.
  3. Make sure you have a .env file in your public_html directory (or specify a custom path if needed).
  4. In a non-Laravel environment, the .env file should contain your Wachey API credentials, such as:

  5. In Laravel, use Laravel’s built-in .env handling mechanism.

Usage

In Laravel

Laravel 9 and Above

For automatic exception management in Laravel 9 and above, you can modify the app.php file.

Inside the ->withExceptions(function (Exceptions $exceptions) { ... }) section, add the following code:

This will automatically send exceptions to the Wachey API.

Older Versions of Laravel

For older versions of Laravel, modify the report() method inside app/Exceptions/Handler.php:

Add the following snippet inside the report() method:

Ensure you also call the parent report() method:

This will automatically report exceptions when they are caught by Laravel.

Manual Exception Reporting

If you prefer not to use automatic exception reporting, you can manually report exceptions within your application using try-catch blocks.

Wherever you expect exceptions, wrap your code in a try-catch and manually call Report::error() inside the catch block:

This gives you control over exactly which exceptions are reported.

Environment Variable Loading Logic

Example .env File:

If your server doesn't use the public_html directory, you can adjust the path in the code or define a constant that points to your .env location.

Configuration

By default, the .env file is expected to be in the public_html folder of your web server. If you are running a custom server configuration, make sure that the path to public_html is correctly set in the code, or define your own path:

License

This project is open-source and available under the MIT License.


All versions of api with dependencies

PHP Build Version
Package Version
No informations.
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 wachey/api contains the following files

Loading the files please wait ....