Download the PHP package czernika/orchid-log-viewer without Composer

On this page you can find all versions of the php package czernika/orchid-log-viewer. 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 orchid-log-viewer

Orchid log viewer

Run tests

Log table layout designed in Orchid style allows you to view and manage Laravel application storage logs within admin panel

Orchid log table

Support

Version 1.x requires PHP greater than 8.1, Orchid version 14 or higher and Laravel version 10+

Version PHP Laravel Orchid
1.x 8.1+ 10.x 14.x

This package is based on rap2hpoutre/laravel-log-viewer package

Installation

Install package via composer

That's it. Package registers menu item and screen for you. All you need to do now is to access logs page (it should be available under Orchid prefix, most likely it will be /admin/logs)

Publish configuration

If you need to publish configuration and localization files run following command

Configuration file contains comments which should help you to understand this package little bit more

Configuration

This package is ready to work out of the box. However you may change any options you wish by your needs

Changing default Screen

If you need to change some data on a Screen and there is no config option for that you still can completely override Screen itself

Create new custom screen class and extend it from OrchidLogListScreen class

Register it in AppServiceProvider. This way package will be aware of using custom screen instead of default one

Default layout consists of three parts - Filters, Modal for stack trace and Table. This mostly should be the same for custom screen. Table hits logs target - make sure it was returned within a query() method or change layout

Changing default Layout

If you need to extend columns or add new one it is also possible

Same technique - create new class and extend it from OrchidLogTableLayout class

Register it in AppServiceProvider

Add custom columns. You may use some of default columns as these:

Change LogData object

All logs returned as Czernika\OrchidLogViewer\LogData class. It has access to all properties from rap2hpoutre/laravel-log-viewer package but in a object way

Basic log represents an array with the following data:

This package converts it into LogData class with array of data as the only parameter in order to access all of it in a convinient way (via methods with the same name but in a camelCase) ...

... plus to have access to Orchid column shortcuts

However if you wish you may change mapper class also and completely override its logic

Create new class

Remember - it will accept only array of log data!

Register it

Now you can render custom layout

If you wish to keep possibility for Orchid shortcuts name array of data as $data variable and use Contentable trait in custom class

And create column without render function

Of course you need to change Table layout also in case you need custom columns

Change actions (clear and delete)

Clear and delete actions basically clears and deletes files, shows toasts and redirects back to the specified route. If you need to do extra work you may change behavior of these actions by registering your own

There is no event registered for exact this reason - you still have full control over process via custom Actions

Every action should inherit Czernika\OrchidLogViewer\Contracts\HandlesLogs contract and therefore implement handle method

$logService has access to methods to clear or delete file (as clearFile($file) and deleteFile($file)). $file variable contains basename of the log file (not the full path to it, eg 'laravel.log' and not '/var/www/html/storage/logs/laravel.log')

Note - no need to redirect in action - it should NOT return any response Package handles redirects itself in order to prevent errors with selected file

Other options

In a configuration file you can disable filters completely - it may be useful when you're using stack log channel and therefore you have one file only

Also you can disable registration of menu item and route completely but you have to re-register them on your own

Known issues

Roadmap

Testing

Using Pest as testing tool

TODOs

License

Open-source under MIT


All versions of orchid-log-viewer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^10.0|^11.0
orchid/platform Version ^14.21
rap2hpoutre/laravel-log-viewer Version ^2.3
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 czernika/orchid-log-viewer contains the following files

Loading the files please wait ....