Skip to content

Commit

Permalink
fix: conflict resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdur Rahman committed Oct 1, 2020
2 parents 2b3e42e + b06ab81 commit e4f444b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# WriteUp

[![Total Downloads](https://img.shields.io/packagist/dt/abdurrahmanriyad/writeup.svg?style=flat-square)](https://packagist.org/packages/abdurrahmanriyad/writeup)
[![Packagist](https://img.shields.io/packagist/v/abdurrahmanriyad/writeup.svg)](https://packagist.org/packages/abdurrahmanriyad/writeup)
[![Packagist](https://img.shields.io/packagist/l/abdurrahmanriyad/writeup.svg)](https://packagist.org/packages/abdurrahmanriyad/writeup)
[![Packagist](https://img.shields.io/packagist/dm/abdurrahmanriyad/writeup.svg)](https://packagist.org/packages/abdurrahmanriyad/writeup)

A Laravel package to log necessary data in a request lifecycle.

Expand All @@ -15,7 +16,7 @@ composer require abdurrahmanriyad/writeup
## Usage
- Publish the assets
``` php
php artisan writeup:publish
php artisan vendor:publish --tag=writeup
```
- Find writeup config file in laravel config folder and <br>
setup as configure as you need.
Expand Down
9 changes: 6 additions & 3 deletions src/WriteupServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ public function boot(Router $router)
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__ . '/../config/config.php' => config_path('writeup.php'),
], 'config');
], 'writeup');
}


if ($this->isWriteupEnabled()) {
if (config('writeup.request_log.enable')) {
$router->pushMiddlewareToGroup('api', WriteupRequestMiddleware::class);
Expand All @@ -45,7 +44,11 @@ public function register()
// Automatically apply the package configuration
$this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'writeup');
}


/**
* check if writeup is enabled for logging
* @return bool
*/
private function isWriteupEnabled()
{
return !(
Expand Down

0 comments on commit e4f444b

Please sign in to comment.