Skip to content
This repository has been archived by the owner on Sep 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request #4 from shieldfy/analysis-zYBgdy
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
netcode authored Jun 8, 2017
2 parents 371fabb + 3524499 commit e1ea03c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions src/Middlewares/ShieldfyMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Shieldfy\ShieldfyLaravelClient\Middlewares;

use DB;
use Closure;
use DB;
use Shieldfy\Guard;

class ShieldfyMiddleware
Expand All @@ -18,22 +18,21 @@ class ShieldfyMiddleware
*/
public function handle($request, Closure $next)
{

$guard = Guard::init([
'app_key' => config('shieldfy.keys.app_key' , env('SHIELDFY_APP_KEY')),
'app_secret' => config('shieldfy.keys.app_secret' , env('SHIELDFY_APP_SECRET')),
'app_key' => config('shieldfy.keys.app_key', env('SHIELDFY_APP_KEY')),
'app_secret' => config('shieldfy.keys.app_secret', env('SHIELDFY_APP_SECRET')),
'debug' => config('shieldfy.debug'),
'action' => config('shieldfy.action'),
'headers'=> config('shieldfy.headers'),
'disable'=> config('shieldfy.disable'),
'headers' => config('shieldfy.headers'),
'disable' => config('shieldfy.disable'),
]);

view()->composer('*', function($view) use($guard) {
view()->composer('*', function ($view) use ($guard) {
$guard->attachViewInfo($view->getPath());
});

//
DB::listen(function($query) use($guard){
DB::listen(function ($query) use ($guard) {
$guard->attachQuery($query);
});

Expand Down
2 changes: 1 addition & 1 deletion src/config/shieldfy.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
| list of monitors you want to disable
|--------------------------------------------------------------------------
*/
'disable' => []
'disable' => [],

];

0 comments on commit e1ea03c

Please sign in to comment.