Download the PHP package micrologs/laravel without Composer

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

micrologs/laravel

Packagist Version

Laravel SDK for Micrologs - self-hosted analytics and error tracking.

Requires Laravel 10, 11, or 12. PHP 8.1+.


How it works

Micrologs is an engine you install on your own server. You own the database, you own the data. This SDK is a first-class Laravel package - it registers a service provider, a facade, and optional middleware. HTTP calls go to your server, not to any third-party service.

Nothing goes anywhere you don't control.


Install

Auto-discovery registers the service provider and facade automatically. No manual registration needed.


Configure

Publish the config file:

Add to your .env:

MICROLOGS_HOST is the URL of the server where you installed Micrologs. MICROLOGS_KEY is your project secret key - find it when you create a project. Never use the public key here - that is for the JS snippet only.


Usage

Via facade

Via injection


Automatic error tracking

The TrackErrors middleware automatically captures unhandled exceptions and sends them to Micrologs. Register it globally so every unhandled exception is tracked without any manual try/catch.

Laravel 11+ (bootstrap/app.php):

Laravel 10 (app/Http/Kernel.php):

The middleware automatically includes the request method, URL, authenticated user ID, and IP in the error context. Severity is inferred from the exception type - Error → critical, auth exceptions → warning, validation exceptions → info, everything else → error. The exception is always re-thrown after tracking so Laravel's own error handling is unaffected.


Tracking

Track an error manually

All fields except message are optional. environment defaults to app()->environment() if not provided.

How grouping works: Micrologs hashes type + message + file + line into a fingerprint. The same error firing 1000 times creates 1 group with 1000 occurrences. If a resolved error fires again, it automatically reopens.


Track an audit event

Use dot notation for action by convention (resource.action) - it makes filtering easy.


Link management

Create a tracked short link

Get a single link

Edit a link

Delete a link


Analytics

All analytics methods return the full response array from your Micrologs server. Access data via $result['data'].

Common params

All methods accept an optional params array:

Param Default Description
range "30d" "7d" / "30d" / "90d" / "custom"
from - "YYYY-MM-DD" - required when range="custom"
to - "YYYY-MM-DD" - required when range="custom"

Visitors

New vs returning visitors

Sessions

Pages, devices, locations, referrers, UTM

Errors

Update error status

Valid statuses: open → investigating → resolved or ignored.

Audit log

Tracked links

Custom date range


Verify a key


Error handling

The SDK never throws or crashes your application. If the Micrologs server is unreachable, returns an error, or times out - the method returns null and calls Laravel's report() function so the failure is logged to your Laravel log, not silently swallowed.

The 5 second timeout is configurable via MICROLOGS_TIMEOUT in .env.


Full method reference

Method Description
Micrologs::error($message, $options) Track an error
Micrologs::audit($action, $actor, $context) Track an audit event
Micrologs::createLink($url, $label) Create a tracked short link
Micrologs::getLink($code) Fetch a single link by code
Micrologs::editLink($code, $options) Edit a link's destination, label, or active state
Micrologs::deleteLink($code) Delete a link by code
Micrologs::updateErrorStatus($ids, $status) Update error group status - single ID or array
Micrologs::verify($key) Verify a public or secret key
Micrologs::analytics()->visitors($params) Unique visitors, pageviews, sessions, bounce rate
Micrologs::analytics()->returning($params) New vs returning visitors
Micrologs::analytics()->sessions($params) Session duration, pages per session
Micrologs::analytics()->pages($params) Top pages by pageviews
Micrologs::analytics()->devices($params) Device, OS, browser breakdown
Micrologs::analytics()->locations($params) Country, region, city breakdown
Micrologs::analytics()->referrers($params) Traffic sources
Micrologs::analytics()->utm($params) UTM campaign data
Micrologs::analytics()->errors($params) Error groups with occurrence counts
Micrologs::analytics()->errorsTrend($params) Daily error trend, top groups
Micrologs::analytics()->errorDetail($params) Single error group - all occurrences and detail
Micrologs::analytics()->audits($params) Audit log events
Micrologs::analytics()->links($params) Tracked links with click counts
Micrologs::analytics()->linkDetail($params) Single link - clicks over time

Requirements


License

MIT - Om Dongaonkar


All versions of laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.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 micrologs/laravel contains the following files

Loading the files please wait ...