Download the PHP package laboiteacode/filament-logs-explorer without Composer

On this page you can find all versions of the php package laboiteacode/filament-logs-explorer. 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 filament-logs-explorer

Filament Logs Explorer

Latest Version on Packagist Tests Total Downloads

Read your Laravel log files without leaving your Filament panel. Files are grouped by logging channel and open in a slide-over with in-file search, match navigation and keyboard shortcuts.

Features

Compatibility

Package Supported versions
PHP 8.2, 8.3, 8.4, 8.5
Laravel 12, 13
Filament 4, 5

Installation

Install the package with Composer:

Register the plugin on every panel where it should appear, usually in app/Providers/Filament/AdminPanelProvider.php:

That is the whole setup. A Logs entry appears in the navigation and lists every file based channel the plugin can find.

Assets

The viewer's CSS and JS are registered with Filament automatically. In production, publish them like any other Filament asset:

Publishing

All three publishable groups are optional:

Usage

The Logs page

The page renders one collapsible section per channel, each showing that channel's most recent files with their name, size and last modified date. A Refresh action in the header re-scans the disk.

Clicking a file opens it in the viewer. Files the process cannot read are listed but marked as unreadable, so a permission problem is visible instead of silent.

The viewer

Action How
Search in the file Type in the search box, matches are highlighted
Jump between matches The up and down buttons, or n and N
Go to the start or end of the file The two buttons, or g and G
Open the previous or next file The < and > buttons, without closing the slide-over
Focus the search box /
Download the raw file The download button
Delete the file The trash button, after a confirmation

While the search box has focus, Enter moves to the next match, Shift+Enter to the previous one, and Escape clears the search. The single letter shortcuts are only active outside the search box, so typing n in a query does what you expect.

Large files

Files larger than reader.max_bytes (5 MB by default) are truncated. The viewer loads the end of the file, which is where the most recent entries are, and shows a banner explaining that the file was truncated and inviting the user to download it in full. Set reader.tail_when_exceeded to false to load the beginning instead.

Configuration

Every option can be set globally in the published config/filament-logs-explorer.php, or per panel through the fluent plugin API. The fluent value always wins, which lets several panels in the same application expose different subsets of the logs.

Channels

By default the plugin auto-discovers every file based channel declared in config/logging.php. Provide an explicit list to restrict and order them:

Untracked files

To also surface *.log files that are not attached to any channel, enable the directory scan. Those files are grouped under their own section:

Navigation

To nest the page inside a Filament cluster, pass its class name:

Access control

The page is available to anyone who can access the panel. Restrict it with a Gate ability:

Or with a closure, which takes precedence over the configured gate:

Either way this drives the page's canAccess() method, so it controls the navigation visibility and the route authorization at once.

Deleting log files

Deletion is enabled by default and has its own authorization, separate from read access, so people can browse logs without being able to delete them. The trash button asks for confirmation before removing the file from disk, and deleting the file currently open also closes the slide-over.

Files are always resolved back from an opaque id, never from a path sent by the browser, so only files the plugin listed itself can be deleted, and the check runs again server side before the file is removed.

Reader

Reference

Config key Fluent method Default
navigation.register registerNavigation() true
navigation.label navigationLabel() translated "Logs"
navigation.icon navigationIcon() heroicon-o-document-magnifying-glass
navigation.active_icon activeNavigationIcon() heroicon-s-document-magnifying-glass
navigation.group navigationGroup() null
navigation.sort navigationSort() null
navigation.parent_item navigationParentItem() null
navigation.badge navigationBadge() false
slug slug() logs
cluster cluster() null
channels channels() [] (auto-discover)
exclude_channels excludeChannels() []
expand_stacks expandStacks() true
discover_untracked_files discoverUntrackedFiles() false
log_directory logDirectory() null (storage_path('logs'))
untracked_channel_label none null (translated label)
files_per_channel filesPerChannel() 15
reader.max_bytes maxBytes() 5242880 (5 MB)
reader.tail_when_exceeded tailWhenExceeded() true
authorization.gate canAccessUsing() null
deletion.enabled deletable() true
deletion.gate canDeleteUsing() null

Translations

The package ships with English, French and Spanish, and follows your application locale. Publish the files to change the wording or to add a language:

Then edit or create lang/vendor/filament-logs-explorer/{locale}/filament-logs-explorer.php.

Security

The viewer only ever reads files it resolved itself from your logging configuration. The front end references files by an opaque, non-reversible id rather than by path, so a path supplied by the browser is never read from disk, and both reading and deleting are re-authorized server side.

If you discover a security issue, please email [email protected] rather than using the issue tracker.

Testing

Changelog

See CHANGELOG.md for what has changed recently.

Credits

License

The MIT License (MIT). See LICENSE.md for more information.


All versions of filament-logs-explorer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^4.0|^5.0
illuminate/contracts Version ^12.0|^13.0
spatie/laravel-package-tools Version ^1.16
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 laboiteacode/filament-logs-explorer contains the following files

Loading the files please wait ...