Skip to content

Commit 3b4f6b3

Browse files
committed
Updated README
1 parent bd697a6 commit 3b4f6b3

File tree

2 files changed

+105
-5
lines changed

2 files changed

+105
-5
lines changed

README.md

Lines changed: 104 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1-
# Laravel Surveillance UI
1+
![Laravel Surveillance UI Logo](https://github.com/neelkanthk/repo_logos/blob/master/LaravelSurveillanceUI_small.png?raw=true)
22

3-
Provides UI interface for Laravel Surveillance Package
3+
![](https://img.shields.io/github/v/release/neelkanthk/laravel-surveillance-ui?style=for-the-badge)
4+
![](https://img.shields.io/packagist/php-v/neelkanthk/laravel-surveillance-ui.svg?style=for-the-badge)
5+
![](https://img.shields.io/badge/Laravel-%3E%3D6.0-red?style=for-the-badge)
6+
![](https://img.shields.io/github/stars/neelkanthk/laravel-surveillance-ui?style=for-the-badge)
7+
![](https://img.shields.io/github/issues/neelkanthk/laravel-surveillance-ui?style=for-the-badge)
8+
![](https://img.shields.io/github/license/neelkanthk/laravel-surveillance-ui?style=for-the-badge)
9+
10+
## What is Laravel Surveillance UI?
11+
12+
Provides a Graphical UI for [Laravel Surveillance](https://github.com/neelkanthk/laravel-surveillance) and integrates within your existing application.
13+
14+
## What is Laravel Surveillance?
15+
16+
Laravel Surveillance is a package to put malicious users, IP addresses and anonymous browser fingerprints under surveillance, write surveillance logs and block malicious ones from accessing the app. [Read more](https://github.com/neelkanthk/laravel-surveillance#laravel-surveillance-)
417

518
## Minimum Requirements
619

@@ -10,11 +23,98 @@ Provides UI interface for Laravel Surveillance Package
1023
## Installation
1124

1225
```bash
13-
composer require neelkanthk/laravel-schedulable-ui
26+
composer require neelkanthk/laravel-surveillance-ui
1427
```
1528

1629
## Usage
1730

31+
## Step 1: [Configure Laravel Surveillance](#step-1)
32+
33+
_NOTE:- If you have already installed ```neelkanthk/laravel-surveillance``` in your application then please go directly to Step 2_.
34+
35+
36+
#### 1.1. Publish the migration files:
37+
```bash
38+
php artisan vendor:publish --provider="Neelkanth\Laravel\Surveillance\Providers\SurveillanceServiceProvider" --tag="migrations"
39+
```
40+
41+
#### 1.2. Publish language files:
42+
```bash
43+
php artisan vendor:publish --provider="Neelkanth\Laravel\Surveillance\Providers\SurveillanceServiceProvider" --tag="lang"
44+
```
45+
46+
#### 1.3. Run the migrations
47+
```bash
48+
php artisan migrate
49+
```
50+
51+
#### 1.4. Publish the config file (Optional):
52+
```bash
53+
php artisan vendor:publish --provider="Neelkanth\Laravel\Surveillance\Providers\SurveillanceServiceProvider" --tag="config"
54+
```
55+
56+
[Read more about Laravel Surveillance installation](https://github.com/neelkanthk/laravel-surveillance#installation)
57+
58+
## Step 2: [Configure Laravel Surveillance UI](#step-2)
59+
60+
_The following steps will install Laravel Surveillance UI in your application_.
61+
62+
#### 2.1. Publish views:
63+
```bash
64+
php artisan vendor:publish --provider="Neelkanth\Laravel\SurveillanceUi\Providers\SurveillanceUiServiceProvider" --tag="views"
65+
```
66+
67+
#### 2.2. Publish config:
68+
```bash
69+
php artisan vendor:publish --provider="Neelkanth\Laravel\SurveillanceUi\Providers\SurveillanceUiServiceProvider" --tag="config"
70+
```
71+
72+
#### 2.3. Publish assets:
73+
```bash
74+
php artisan vendor:publish --provider="Neelkanth\Laravel\SurveillanceUi\Providers\SurveillanceUiServiceProvider" --tag="assets"
75+
```
76+
77+
## Add Middleware
78+
79+
Laravel Surveillance provides a ```surveillance``` middleware that can be used on any route or route group to make it eligible for surveillance.
80+
81+
```php
82+
Route::middleware(["surveillance"])->get('/path', function () {});
83+
```
84+
85+
[Read more about middleware usage](https://github.com/neelkanthk/laravel-surveillance#middleware-usage)
86+
87+
## Accessing the Dashboard
88+
89+
The **Laravel Surveillance UI manager dashboard** can be accessed at: http://your.domain/surveillance/ui/manager
90+
91+
The **Laravel Surveillance UI logs dashboard** can be accessed at: http://your.domain/surveillance/ui/logs
92+
93+
## Customizing the package routes
94+
95+
### Customizing the route prefix
96+
97+
By default ```surveillance/ui``` route prefix is appended to the package's routes.
98+
If you want to customize it then you can do so easily in the ```config/surveillance-ui.php``` file's file's _**prefix**_ key as shown below.
99+
100+
```php
101+
/**
102+
* The prefix to be used in the surveillance ui routes
103+
*/
104+
"prefix" => "surveillance/ui",
105+
```
106+
107+
### Customizing the route middleware
108+
109+
By default ```web``` middleware is added to the package's routes. If you want to add more middlewares like ```auth``` or something else, then you can add them easily in the ```config/surveillance-ui.php``` file's _**middleware**_ key as shown below.
110+
111+
```php
112+
/**
113+
* The middleware(s) to be used in the surveillance ui routes
114+
*/
115+
"middleware" => ["web", "auth"], //auth middleware added
116+
```
117+
18118
## Contributing
19119
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
20120

@@ -23,7 +123,7 @@ If you discover any security-related issues, please email me.neelkanth@gmail.com
23123

24124
## Credits
25125

26-
- [Neelkanth Kaushik](https://github.com/username)
126+
- [Neelkanth Kaushik](https://github.com/neelkanthk)
27127
- [All Contributors](../../contributors)
28128

29129
## License

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"require": {
1414
"php": ">=7.2",
1515
"laravel/framework": ">=6.0",
16-
"neelkanthk/laravel-surveillance": "^1.2"
16+
"neelkanthk/laravel-surveillance": "^1.3"
1717
},
1818
"autoload": {
1919
"psr-4": {

0 commit comments

Comments
 (0)