Skip to content

Commit 73adfc5

Browse files
committed
update readme
1 parent 6caa0e8 commit 73adfc5

File tree

1 file changed

+56
-10
lines changed

1 file changed

+56
-10
lines changed

README.md

Lines changed: 56 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
- [File Tree](#file-tree)
2121
- [License](#license)
2222

23-
2423
### About
2524
Laravel logger is an activity event logger for your laravel application. It comes out the box with ready to use with dashboard to view your activity. Laravel logger can be added as a middleware or called through a trait. This package is easily configurable and customizable.
2625

@@ -35,7 +34,28 @@ Laravel logger can work out the box with or without the following roles packages
3534

3635
| Laravel Logger Features |
3736
| :------------ |
38-
||
37+
|Logs login page visits|
38+
|Logs user logins|
39+
|Logs user logouts|
40+
|Routing Events can recording using middleware|
41+
|Records activity timestamps|
42+
|Records activity description|
43+
|Records activity user type with crawler detection.|
44+
|Records activity Method|
45+
|Records activity Route|
46+
|Records activity Ip Address|
47+
|Records activity User Agent|
48+
|Records activity Browser Language|
49+
|Records activity referrer|
50+
|Activity panel dashboard|
51+
|Individual activity drilldown report dashboard|
52+
|Activity Drilldown looks up Id Address meta information|
53+
|Activity Drilldown shows user roles if enabled|
54+
|Activity Drilldown shows associated user events|
55+
|Activity log can be cleared, restored, and destroyed using eloquent softdeletes|
56+
|Cleared activity logs can be viewed and have drilldown ability|
57+
|Uses font awesome, cdn assets can be optionally called in configuration|
58+
|Lots of [configuration](#configuration) options|
3959

4060
### Requirements
4161
* [Laravel 5.1, 5.2, 5.3, 5.4, or 5.5+](https://laravel.com/docs/installation)
@@ -62,7 +82,17 @@ Register the package with laravel in `config/app.php` under `providers` with the
6282
];
6383
```
6484

65-
3. Optionally publish the packages views, config file, assets, and language files by running the following from your projects root folder:
85+
3. Run the migration to add the table to record the activities to:
86+
87+
```php
88+
php artisan migrate
89+
```
90+
91+
* Note: If you want to specify a different table or connection make sure you update your `.env` file with the needed configuration variables.
92+
93+
4. Optionally Update your `.env` file and associated settings (see [Environment File](#environment-file) section)
94+
95+
5. Optionally publish the packages views, config file, assets, and language files by running the following from your projects root folder:
6696

6797
```bash
6898
php artisan vendor:publish --tag=laravellogger
@@ -76,7 +106,7 @@ Or you can variables to your `.env` file.
76106
##### Environment File
77107
Here are the `.env` file variables available:
78108

79-
```
109+
```bash
80110
LARAVEL_LOGGER_DATABASE_CONNECTION=mysql
81111
LARAVEL_LOGGER_DATABASE_TABLE=laravel_logger_activity
82112
LARAVEL_LOGGER_ROLES_ENABLED=true
@@ -107,11 +137,15 @@ LARAVEL_LOGGER_BOOTSTRAP_CSS_CDN_URL=https://maxcdn.bootstrapcdn.com/bootstrap/3
107137

108138
##### Middleware Usage
109139
Events for laravel authentication scaffolding are listened for as providers and are enabled via middleware.
110-
You can add events to your routes and controllers via the `activity` middleware.
140+
You can add events to your routes and controllers via the middleware:
141+
142+
```php
143+
activity
144+
```
111145

112146
Example to start recording page views using middlware in `web.php`:
113147

114-
```
148+
```php
115149
Route::group(['middleware' => ['web', 'activity']], function () {
116150
Route::get('/', 'WelcomeController@welcome')->name('welcome');
117151
});
@@ -125,12 +159,14 @@ When using the trait you can customize the event description.
125159

126160
To use the trait:
127161
1. Include the call in the head of your class file:
128-
```
162+
163+
```php
129164
use jeremykenedy\LaravelLogger\App\Http\Traits\ActivityLogger;
130165
```
131166

132167
2. Include the trait call in the opening of your class:
133-
```
168+
169+
```php
134170
use ActivityLogger;
135171
```
136172

@@ -148,10 +184,20 @@ To use the trait:
148184
* ```/activity/cleared/log/{id}```
149185

150186
### Screenshots
151-
![ALT](URL)
187+
![dashboard](https://s3-us-west-2.amazonaws.com/github-project-images/laravel-logger/1-dashboard.jpg)
188+
![drilldown](https://s3-us-west-2.amazonaws.com/github-project-images/laravel-logger/2-drilldown.jpg)
189+
![confirm-clear](https://s3-us-west-2.amazonaws.com/github-project-images/laravel-logger/3-confirm-clear.jpg)
190+
![log-cleared-msg](https://s3-us-west-2.amazonaws.com/github-project-images/laravel-logger/4-log-cleared-msg.jpg)
191+
![cleared-log](https://s3-us-west-2.amazonaws.com/github-project-images/laravel-logger/5-cleared-log.jpg)
192+
![confirm-restore](https://s3-us-west-2.amazonaws.com/github-project-images/laravel-logger/5-confirm-restore.jpg)
193+
![confirm-destroy](https://s3-us-west-2.amazonaws.com/github-project-images/laravel-logger/6-confirm-destroy.jpg)
194+
![success-destroy](https://s3-us-west-2.amazonaws.com/github-project-images/laravel-logger/7-success-destroy.jpg)
195+
![success-restored](https://s3-us-west-2.amazonaws.com/github-project-images/laravel-logger/8-success-restored.jpg)
196+
![cleared-drilldown](https://s3-us-west-2.amazonaws.com/github-project-images/laravel-logger/9-cleared-drilldown.jpg)
152197

153198
### File Tree
154-
```
199+
200+
```bash
155201
├── .gitignore
156202
├── CODE_OF_CONDUCT.md
157203
├── LICENSE

0 commit comments

Comments
 (0)