Mongodb Logger
Package to save the user hits on pages to Mongodb within laravel framework, (*1)
Getting Started
You will find this package in packagist.org at https://packagist.org/packages/influencers/logger, (*2)
Prerequisites
1- Set Minimum Stability of your core laravel to dev by:
- Adding this line to core composer.json file: "minimum-stability": "dev"
- run command: composer dump-autoload, (*3)
2- Install Mongodb client on your server. If it is not installed, the package will refuse to install., (*4)
Installing
1- using composer in your laravel root, run the following command:
- composer require influencers/logger, (*5)
2- Register the package provider by adding the following line to the file config/app.php:, (*6)
- Influencers\Logger\LoggerServiceProvider::class,
3- Set the configuration of Mongodb Server in .env file of your laravel root dir:
- mongodb_host=
- mongodb_port=
- mongodb_database=
- mongodb_collection=, (*7)
replace the <> with your server values., (*8)
-
Routes Examples:, (*9)
-
/page1, (*10)
- /page2
- /page-404
- /page-403
- /summary : contains all your visits sorted by time descending