neelkanthk / laravel-surveillance-ui
Laravel Surveillance GUI provides a web based interface for Laravel Surveillance package.
Installs: 65
Dependents: 0
Suggesters: 0
Security: 0
Stars: 20
Watchers: 2
Forks: 2
Open Issues: 0
Language:JavaScript
Type:laravel-package
Requires
- php: >=7.2
- laravel/framework: >=6.0
- neelkanthk/laravel-surveillance: ^1.3
Requires (Dev)
- doctrine/dbal: ^4.0@dev
- orchestra/testbench: ^6.0|^7.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-01-15 06:39:09 UTC
README
What is Laravel Surveillance UI?
Provides a Graphical UI for Laravel Surveillance and integrates within your existing application.
What is Laravel Surveillance?
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
Laravel Surveillance UI Demo
Minimum Requirements
- Laravel 6.0
- PHP 7.2
Installation
composer require neelkanthk/laravel-surveillance-ui
Usage
Step 1: Configure Laravel Surveillance
NOTE:- If you have already installed neelkanthk/laravel-surveillance
in your application then please go directly to Step 2.
1.1. Publish the migration files:
php artisan vendor:publish --provider="Neelkanth\Laravel\Surveillance\Providers\SurveillanceServiceProvider" --tag="migrations"
1.2. Publish language files:
php artisan vendor:publish --provider="Neelkanth\Laravel\Surveillance\Providers\SurveillanceServiceProvider" --tag="lang"
1.3. Run the migrations
php artisan migrate
1.4. Publish the config file (Optional):
php artisan vendor:publish --provider="Neelkanth\Laravel\Surveillance\Providers\SurveillanceServiceProvider" --tag="config"
Read more about Laravel Surveillance installation
Step 2: Configure Laravel Surveillance UI
The following steps will install Laravel Surveillance UI in your application.
2.1. Publish views:
php artisan vendor:publish --provider="Neelkanth\Laravel\SurveillanceUi\Providers\SurveillanceUiServiceProvider" --tag="views"
2.2. Publish config:
php artisan vendor:publish --provider="Neelkanth\Laravel\SurveillanceUi\Providers\SurveillanceUiServiceProvider" --tag="config"
2.3. Publish assets:
php artisan vendor:publish --provider="Neelkanth\Laravel\SurveillanceUi\Providers\SurveillanceUiServiceProvider" --tag="assets"
Add Middleware
Laravel Surveillance provides a surveillance
middleware that can be used on any route or route group to make it eligible for surveillance.
Route::middleware(["surveillance"])->get('/path', function () {});
Read more about middleware usage
Accessing the Dashboard
The Laravel Surveillance UI manager dashboard can be accessed at: http://your.domain/surveillance/ui/manager
The Laravel Surveillance UI logs dashboard can be accessed at: http://your.domain/surveillance/ui/logs
Overriding and customizing the package default configuration
Customizing the route prefix
By default surveillance/ui
route prefix is appended to the package's routes.
If you want to customize it then you can do so easily in the config/surveillance-ui.php
file's prefix key as shown below.
/** * The prefix to be used in the surveillance ui routes */ "prefix" => "surveillance/ui",
Customizing the route middleware
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.
/** * The middleware(s) to be used in the surveillance ui routes */ "middleware" => ["web", "auth"], //auth middleware added
Customizing the views
After publishing the package views you can change the design as per your taste.
The views are published inside your project's resources/views/vendor/surveillance-ui
directory.
Customizing the JS and CSS
After publishing the package assets you can tweak the JS and CSS inside your project's public/surveillance-ui
directory.
Replacing the default logo
You can change the default CCTV logo and favicon displayed on the Surveillance Dashboard by replacing them with your own at public/surveillance-ui/images/logo.png
and public/surveillance-ui/images/favicon.ico
.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Security
If you discover any security-related issues, please email me.neelkanth@gmail.com instead of using the issue tracker.