<?php

namespace LaravelFlare\Flare\Http\Middleware;

use Closure;
use LaravelFlare\Flare\Contracts\PermissionsInterface;
use LaravelFlare\Flare\Exceptions\PermissionsException;

class CheckPermissions
{
    /**
     * Permissions
     * 
     * @var \LaravelFlare\Flare\Contracts\PermissionsInterface
     */
    protected $permissions;

    /**
     * __construct
     * @param PermissionsInterface $permissions 
     */
    public function __construct(PermissionsInterface $permissions)
    {
        $this->permissions = $permissions;
    }

    /**
     * Handle an incoming request.
     *
     * @param \Illuminate\Http\Request $request
     * @param \Closure                 $next
     * 
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if (!$this->permissions->check()) {
            throw new PermissionsException('Permission denied!');
        }

        return $next($request);
    }
}

<?php

namespace LaravelFlare\Flare\Http\Middleware;

use Closure;
use Illuminate\Contracts\Routing\Middleware;
use LaravelFlare\Flare\Contracts\PermissionsInterface;
use LaravelFlare\Flare\Exceptions\PermissionsException;

class CheckPermissions implements Middleware
{
    /**
     * Permissions
     * 
     * @var \LaravelFlare\Flare\Contracts\PermissionsInterface
     */
    protected $permissions;

    /**
     * __construct
     * @param PermissionsInterface $permissions 
     */
    public function __construct(PermissionsInterface $permissions)
    {
        $this->permissions = $permissions;
    }

    /**
     * Handle an incoming request.
     *
     * @param \Illuminate\Http\Request $request
     * @param \Closure                 $next
     * 
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if (!$this->permissions->check()) {
            throw new PermissionsException('Permission denied!');
        }

        return $next($request);
    }
}

--- 
+++ 
@@ -3,11 +3,10 @@
 namespace LaravelFlare\Flare\Http\Middleware;
 
 use Closure;
-use Illuminate\Contracts\Routing\Middleware;
 use LaravelFlare\Flare\Contracts\PermissionsInterface;
 use LaravelFlare\Flare\Exceptions\PermissionsException;
 
-class CheckPermissions implements Middleware
+class CheckPermissions
 {
     /**
      * Permissions
Remove Check Permissions Middleware Contract (deprecated)
