Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rap2hpoutre/laravel-log-viewer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.22.0
Choose a base ref
...
head repository: rap2hpoutre/laravel-log-viewer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Oct 1, 2018

  1. Update logviewer.php

    rap2hpoutre authored Oct 1, 2018
    Copy the full SHA
    fd0821b View commit details

Commits on Dec 12, 2018

  1. Support $router for Lumen (#181)

    Lumen new version use $router instead of $app
    mrahmadt authored and rap2hpoutre committed Dec 12, 2018
    Copy the full SHA
    aec7a84 View commit details

Commits on Jan 2, 2019

  1. Update LICENSE

    rap2hpoutre authored Jan 2, 2019
    Copy the full SHA
    68d1f3b View commit details

Commits on Jan 29, 2019

  1. Hide from search robots (#186)

    qWici authored and rap2hpoutre committed Jan 29, 2019
    Copy the full SHA
    76bff7b View commit details

Commits on Feb 27, 2019

  1. Update composer.json

    rap2hpoutre authored Feb 27, 2019
    Copy the full SHA
    14a591f View commit details
  2. Copy the full SHA
    98a333e View commit details

Commits on Mar 2, 2019

  1. fix setFolder method (#188)

    $this->storage_path expected to be a string, not an array
    ikeedo authored and rap2hpoutre committed Mar 2, 2019
    Copy the full SHA
    f6acf97 View commit details

Commits on May 31, 2019

  1. Fixing if ->storage_path is array and have Multiple Log View Location…

    …s folders (#190)
    
    * Fixing if ->storage_path is array and have Multiple Log View Locations folders
    
    * Replace variable from  to
    elminson authored and rap2hpoutre committed May 31, 2019
    Copy the full SHA
    2f9c1bb View commit details

Commits on Jun 12, 2019

  1. Update log.blade.php

    rap2hpoutre authored Jun 12, 2019
    Copy the full SHA
    ba8e645 View commit details

Commits on Aug 19, 2019

  1. Add MAX_FILE_SIZE to config (#201)

    * Add MAX_FILE_SIZE to config
    
    * Fix typo
    cbaconnier authored and rap2hpoutre committed Aug 19, 2019
    Copy the full SHA
    30fffea View commit details
  2. Make view path a variable (#197)

    * Make view path a variable
    
    * Typo
    
    * Update LogViewerController.php
    khendrickx authored and rap2hpoutre committed Aug 19, 2019
    Copy the full SHA
    1271590 View commit details

Commits on Sep 4, 2019

  1. laravel 6 support (#204)

    djoeycl authored and rap2hpoutre committed Sep 4, 2019
    Copy the full SHA
    209e37e View commit details
  2. Copy the full SHA
    5957eb0 View commit details

Commits on Dec 3, 2019

  1. Handle empty log array while preparing data to display (#214)

    PHP 7.4 throws an error while trying to access array offset on value
    of type bool returned by reset() method for empty log
    RaazPuspa authored and rap2hpoutre committed Dec 3, 2019
    Copy the full SHA
    031ed45 View commit details
  2. Update .travis.yml

    rap2hpoutre authored Dec 3, 2019
    Copy the full SHA
    fa78fb2 View commit details

Commits on Feb 20, 2020

  1. add php 7.4 to travis test (#222)

    sergiy-petrov authored Feb 20, 2020
    Copy the full SHA
    32c3b28 View commit details

Commits on Mar 5, 2020

  1. Copy the full SHA
    3506baa View commit details
  2. Added configuration publishing directions (#221)

    A group (a.k.a. tag) should be added in publishing declaration (src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewerServiceProvider.php line 34) to make this clearer.
    rap2hpoutre authored Mar 5, 2020
    Copy the full SHA
    ae73a6e View commit details
  3. Update README.md

    rap2hpoutre authored Mar 5, 2020
    Copy the full SHA
    9a6b930 View commit details
  4. Update README.md

    rap2hpoutre authored Mar 5, 2020
    Copy the full SHA
    dbfc09d View commit details

Commits on Apr 22, 2020

  1. Fixing PSR-0 autoload issue (#227)

    * Making the controller PSR-0 Compatible
    
    * Update composer.json
    
    * Dynamic base controller
    
    * Update LogViewerController.php
    
    * Dependency class namespace fix
    
    * Changing the package name back after testing
    
    * Updating documentation
    aglipanci authored Apr 22, 2020
    Copy the full SHA
    a50d2e8 View commit details
  2. Delete .gitkeep

    rap2hpoutre authored Apr 22, 2020
    Copy the full SHA
    c764996 View commit details
  3. Redirection after cleaning a log file is done to the previous url. (#218

    )
    
    Co-authored-by: Syed Abidur Rahman <abidur.rahman@shohoz.net>
    sarahman and Syed Abidur Rahman authored Apr 22, 2020
    Copy the full SHA
    52c2a39 View commit details

Commits on Apr 23, 2020

  1. Copy the full SHA
    337bb72 View commit details

Commits on Apr 27, 2020

  1. Copy the full SHA
    02023f5 View commit details

Commits on Jul 31, 2020

  1. Copy the full SHA
    40a6a9e View commit details

Commits on Sep 8, 2020

  1. Laravel 8 support (#241)

    Kussie authored Sep 8, 2020
    Copy the full SHA
    27392d2 View commit details

Commits on Oct 1, 2020

  1. Copy the full SHA
    1a11c77 View commit details

Commits on Nov 4, 2021

  1. support for laravel daily logs (#209)

    * resolve conflict
    
    * Add laravel 8 route format to readme
    
    * Add more tests for newly added methods
    
    * fix failing tests
    djunehor authored Nov 4, 2021
    Copy the full SHA
    ce5b1d0 View commit details
  2. Update README.md

    rap2hpoutre authored Nov 4, 2021
    Copy the full SHA
    4fa9b45 View commit details

Commits on Feb 10, 2022

  1. Copy the full SHA
    199b4f2 View commit details

Commits on Apr 6, 2022

  1. Fix left hand file name sorting (#268)

    * Sort files before returning them
    
    * Fix indentation
    
    * Reset array keys before returning it
    sdapkus authored Apr 6, 2022
    Copy the full SHA
    52e7c70 View commit details

Commits on May 4, 2022

  1. fix: fix #256

    rap2hpoutre authored May 4, 2022
    Copy the full SHA
    1dfd871 View commit details

Commits on Dec 15, 2022

  1. Mention Laravel 9 in supported versions (#282)

    Include Laravel 9 in the list of supported Laravel supported versions
    Khuthaily authored Dec 15, 2022
    Copy the full SHA
    83cb217 View commit details

Commits on Feb 15, 2023

  1. Copy the full SHA
    c4148ec View commit details

Commits on Oct 7, 2023

  1. Add Github Actions

    * add github actions
    * drop support for laravel 4 & 5
    * minimum version of php 7.2
    sergiy-petrov authored Oct 7, 2023
    Copy the full SHA
    65d60ea View commit details
  2. Delete .travis.yml

    sergiy-petrov authored Oct 7, 2023
    Copy the full SHA
    04437b5 View commit details

Commits on Oct 9, 2023

  1. Merge pull request #291 from sergiy-petrov/php-8.3

    Add Github Actions
    imanghafoori1 authored Oct 9, 2023
    Copy the full SHA
    f7dc4a2 View commit details

Commits on Oct 10, 2023

  1. Copy the full SHA
    71581e6 View commit details
  2. Copy the full SHA
    dbd23fd View commit details
  3. Copy the full SHA
    2ade35e View commit details
  4. Fixes issue #277

    imanghafoori1 committed Oct 10, 2023
    Copy the full SHA
    d09e6b5 View commit details

Commits on Jan 11, 2024

  1. Copy the full SHA
    0ca0290 View commit details
  2. Update README.md

    rap2hpoutre authored Jan 11, 2024
    Copy the full SHA
    e77c7ad View commit details

Commits on Mar 20, 2024

  1. Update composer.json (#297)

    * Update composer.json
    
    * up
    
    * up warnings
    
    * up
    
    * up
    
    * up
    
    * up
    
    * test coverage
    rap2hpoutre authored Mar 20, 2024
    Copy the full SHA
    49c52ae View commit details

Commits on Mar 10, 2025

  1. Laravel 12 (#309)

    * bump dependencies
    
    * fix namespaces
    
    * add `.phpunit.result.cache` to `.gitignore`
    
    * remove php 8.2 / laravel 11 exclusion
    
    * add php 8.4 and laravel 12 to matrix
    
    * update laravel versions in readme
    tanerkay authored Mar 10, 2025
    Copy the full SHA
    ab85d5d View commit details
91 changes: 91 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Tests

on:
push:
pull_request:

jobs:
tests:
strategy:
fail-fast: true
matrix:
php: ["7.2", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]
laravel: ["^6.0", "^7.0", "^8.0", "^9.0", "^10.0", "^11.0", "^12.0"]
exclude:
- php: "8.0"
laravel: "^10.0"
- php: "7.4"
laravel: "^10.0"
- php: "7.2"
laravel: "^10.0"
- php: "7.4"
laravel: "^9.0"
- php: "7.2"
laravel: "^9.0"
- php: "8.4"
laravel: "^8.0"
- php: "8.3"
laravel: "^8.0"
- php: "8.2"
laravel: "^8.0"
- php: "7.2"
laravel: "^8.0"
- php: "8.4"
laravel: "^7.0"
- php: "8.3"
laravel: "^7.0"
- php: "8.2"
laravel: "^7.0"
- php: "8.1"
laravel: "^7.0"
- php: "8.4"
laravel: "^6.0"
- php: "8.3"
laravel: "^6.0"
- php: "8.2"
laravel: "^6.0"
- php: "8.1"
laravel: "^6.0"
- php: "7.2"
laravel: "^11.0"
- php: "7.4"
laravel: "^11.0"
- php: "8.0"
laravel: "^11.0"
- php: "8.1"
laravel: "^11.0"
- php: "7.2"
laravel: "^12.0"
- php: "7.4"
laravel: "^12.0"
- php: "8.0"
laravel: "^12.0"
- php: "8.1"
laravel: "^12.0"
name: "PHP${{ matrix.php }} - Laravel${{ matrix.laravel }}"

runs-on: "ubuntu-latest"

steps:
- name: "Checkout code"
uses: "actions/checkout@v3"

- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
extensions: "dom, curl, libxml, mbstring, zip, fileinfo"
tools: "composer:v2"
coverage: "none"

- name: "Check Composer configuration"
run: "composer validate --strict"

- name: "Install dependencies from composer.json"
run: "composer update --with='laravel/framework:${{ matrix.laravel }}' --no-interaction --no-progress"

- name: "Check PSR-4 mapping"
run: "composer dump-autoload --optimize --strict-psr"

- name: "Execute unit tests"
run: "vendor/bin/phpunit"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/vendor
composer.lock
/.idea
/build
/build
.phpunit.result.cache
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2018 rap2hpoutre
Copyright (c) 2014-present rap2hpoutre

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
59 changes: 30 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
Laravel 5 log viewer
======================
Laravel log viewer
==================

[![Packagist](https://img.shields.io/packagist/v/rap2hpoutre/laravel-log-viewer.svg)](https://packagist.org/packages/rap2hpoutre/laravel-log-viewer)
[![Packagist](https://img.shields.io/packagist/l/rap2hpoutre/laravel-log-viewer.svg)](https://packagist.org/packages/rap2hpoutre/laravel-log-viewer)
[![Packagist](https://img.shields.io/packagist/dm/rap2hpoutre/laravel-log-viewer.svg)](https://packagist.org/packages/rap2hpoutre/laravel-log-viewer)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/rap2hpoutre/laravel-log-viewer/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/rap2hpoutre/laravel-log-viewer/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/rap2hpoutre/laravel-log-viewer/badges/build.png?b=master)](https://scrutinizer-ci.com/g/rap2hpoutre/laravel-log-viewer/build-status/master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7be7a05b07c94f319ec35f95a4d64074)](https://www.codacy.com/app/rap2hpoutre/laravel-log-viewer)
[![Author](https://img.shields.io/badge/author-@rap2h-blue.svg)](https://twitter.com/rap2h)


TL;DR
-----
Log Viewer for Laravel 5 (compatible with 4.2 too) and Lumen. **Install with composer, create a route to `LogViewerController`**. No public assets, no vendor routes, works with and/or without log rotate. Inspired by Micheal Mand's [Laravel 4 log viewer](https://github.com/mikemand/logviewer) (works only with laravel 4.1)
## TL;DR
Log Viewer for Laravel 6, 7, 8, 9, 10, 11 & 12 and Lumen. **Install with composer, create a route to `LogViewerController`**. No public assets, no vendor routes, works with and/or without log rotate. Inspired by Micheal Mand's [Laravel 4 log viewer](https://github.com/mikemand/logviewer) (works only with laravel 4.1)

What ?
------
## What ?
Small log viewer for laravel. Looks like this:

![capture d ecran 2014-12-01 a 10 37 18](https://cloud.githubusercontent.com/assets/1575946/5243642/8a00b83a-7946-11e4-8bad-5c705f328bcc.png)

Install (Laravel)
-----------------
## Install (Laravel)
Install via composer
```
```bash
composer require rap2hpoutre/laravel-log-viewer
```

@@ -34,24 +29,14 @@ Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::class,

Add a route in your web routes file:
```php
Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index');
Route::get('logs', [\Rap2hpoutre\LaravelLogViewer\LogViewerController::class, 'index']);
```

Go to `http://myapp/logs` or some other route

**Optionally** publish `log.blade.php` into `/resources/views/vendor/laravel-log-viewer/` for view customization:

```
php artisan vendor:publish \
--provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" \
--tag=views
```

Install (Lumen)
---------------

### Install (Lumen)
Install via composer
```
```bash
composer require rap2hpoutre/laravel-log-viewer
```

@@ -62,13 +47,29 @@ $app->register(\Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::cl

Explicitly set the namespace in `app/Http/routes.php`:
```php
$app->group(['namespace' => '\Rap2hpoutre\LaravelLogViewer'], function() use ($app) {
$app->get('logs', 'LogViewerController@index');
$router->group(['namespace' => '\Rap2hpoutre\LaravelLogViewer'], function() use ($router) {
$router->get('logs', 'LogViewerController@index');
});
```

Troubleshooting
---------------
## Advanced usage
### Customize view
Publish `log.blade.php` into `/resources/views/vendor/laravel-log-viewer/` for view customization:

```bash
php artisan vendor:publish \
--provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" \
--tag=views
```

### Edit configuration
Publish `logviewer.php` configuration file into `/config/` for configuration customization:

```bash
php artisan vendor:publish \
--provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider"
```

### Troubleshooting
If you got a `InvalidArgumentException in FileViewFinder.php` error, it may be a problem with config caching. Double check installation, then run `php artisan config:clear`.

19 changes: 13 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,14 @@
"name": "rap2hpoutre/laravel-log-viewer",
"description": "A Laravel log reader",
"license": "MIT",
"keywords": ["log", "log-reader", "log-viewer", "logging", "laravel", "lumen"],
"keywords": [
"log",
"log-reader",
"log-viewer",
"logging",
"laravel",
"lumen"
],
"type": "laravel-package",
"authors": [
{
@@ -11,12 +18,12 @@
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "4.2.*|5.*"
"php": "^7.2|^8.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0"
},
"require-dev": {
"phpunit/phpunit": "^7",
"orchestra/testbench": "^3.6"
"phpunit/phpunit": "^7||^8.4|^9.3.3|^10.1|^11.0",
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0|^10.0"
},
"autoload": {
"classmap": [
@@ -28,7 +35,7 @@
},
"autoload-dev": {
"psr-4": {
"Rap2hpoutre\\LaravelLogViewer\\Test\\": "tests/"
"Rap2hpoutre\\LaravelLogViewer\\Tests\\": "tests/"
}
},
"extra": {
14 changes: 1 addition & 13 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true" bootstrap="./vendor/autoload.php" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false">
<phpunit colors="true" bootstrap="./vendor/autoload.php">
<testsuites>
<testsuite name="all">
<directory suffix="Test.php">tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
</phpunit>
Loading