Package Data | |
---|---|
Maintainer Username: | vcian |
Package Create Date: | 2023-04-06 |
Package Last Update: | 2024-09-03 |
Home Page: | https://packagist.org/packages/vcian/laravel-db-auditor |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-19 15:00:12 |
Package Statistics | |
---|---|
Total Downloads: | 9,084 |
Monthly Downloads: | 1,068 |
Daily Downloads: | 62 |
Total Stars: | 271 |
Total Watchers: | 5 |
Total Forks: | 27 |
Total Open Issues: | 1 |
Requires PHP 8.0+ | Laravel 8.0+
Require Laravel DB Auditor using Composer:
composer require --dev vcian/laravel-db-auditor
You can access DB Auditor using below artisan commands.
php artisan db:audit
This command give you options to select feature like check the database standards or check the constraint.
Now, you can skip tables which you don't want to check. Add skip table name in the .db-auditor.php file.
Note:
If you want to check standalone feature then you can execute below artisan command one by one.
php artisan db:constraint
This command gives you result with list of tables with primary,foreign,unique,index constraint.
You can add more constraint to the table by seeing existing constraint with table.
Below example give insights about the how to see constraints in table and how to add.
Note :-
- SQLite does not allow to define PRIMARY KEY or FOREIGN KEY into a existing table.
- Add constraint option is not support for PostgreSQL. Will release soon.
php artisan db:standard
This command give you result with list of table with standard follow indication.
You can also see table specific column name which doesn't have standard followed.
Below example give insights of database standards reports and suggestions.
php artisan db:track
This command give you the track of the database files. Like when it's created with how many field in which table or whom created. this type of information show in the result.
You can also filter with --table=, --action=, --status=. Note: "created by" return the github username and if it's not git repo than it shows system username.
Note:
You have to set your database name with DB_DATABASE parameter in you laravel .env file to use this feature.
You can also access this feature through WEB UI. To access web UI, kindly execute below command.
php artisan vendor:publish --tag=public
select "db-auditor"
Route - To access the web UI "/laravel-db-auditor"
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
We believe in
👇
ACT NOW
PERFECT IT LATER
CORRECT IT ON THE WAY.
If you discover any security-related issues, please email ruchit.patel@viitor.cloud instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.