Skip to content

Commit 9a6b930

Browse files
authored
Update README.md
1 parent ae73a6e commit 9a6b930

File tree

1 file changed

+24
-28
lines changed

1 file changed

+24
-28
lines changed

README.md

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,17 @@ Laravel log viewer
1010
[![Author](https://img.shields.io/badge/[email protected])](https://twitter.com/rap2h)
1111

1212

13-
TL;DR
14-
-----
13+
## TL;DR
1514
Log Viewer for Laravel 5, 6 (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)
1615

17-
What ?
18-
------
16+
## What ?
1917
Small log viewer for laravel. Looks like this:
2018

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

23-
Install (Laravel)
24-
-----------------
21+
## Install (Laravel)
2522
Install via composer
26-
```
23+
```bash
2724
composer require rap2hpoutre/laravel-log-viewer
2825
```
2926

@@ -39,26 +36,9 @@ Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index');
3936

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

42-
**Optionally** publish `log.blade.php` into `/resources/views/vendor/laravel-log-viewer/` for view customization:
43-
44-
```
45-
php artisan vendor:publish \
46-
--provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" \
47-
--tag=views
48-
```
49-
50-
**Optionally** publish `logviewer.php` configuration file into `/config/` directory of your app for configuration customization:
51-
52-
```
53-
php artisan vendor:publish \
54-
--provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider"
55-
```
56-
57-
Install (Lumen)
58-
---------------
59-
39+
### Install (Lumen)
6040
Install via composer
61-
```
41+
```bash
6242
composer require rap2hpoutre/laravel-log-viewer
6343
```
6444

@@ -74,8 +54,24 @@ $router->group(['namespace' => '\Rap2hpoutre\LaravelLogViewer'], function() use
7454
});
7555
```
7656

77-
Troubleshooting
78-
---------------
57+
## Advanced usage
58+
### Customize view
59+
Publish `log.blade.php` into `/resources/views/vendor/laravel-log-viewer/` for view customization:
60+
61+
```bash
62+
php artisan vendor:publish \
63+
--provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" \
64+
--tag=views
65+
```
66+
67+
### Edit configuration
68+
Publish `logviewer.php` configuration file into `/config/` for configuration customization:
69+
70+
```bash
71+
php artisan vendor:publish \
72+
--provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider"
73+
```
7974

75+
### Troubleshooting
8076
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`.
8177

0 commit comments

Comments
 (0)