ok

Mini Shell

Direktori : /home2/selectio/www/3idiotsgadgetstore.in/app/Http/Middleware/
Upload File :
Current File : /home2/selectio/www/3idiotsgadgetstore.in/app/Http/Middleware/ModulePermissionMiddleware.php

<?php

namespace App\Http\Middleware;

use App\CPU\Helpers;
use Brian2694\Toastr\Facades\Toastr;
use Closure;

class ModulePermissionMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param \Illuminate\Http\Request $request
     * @param \Closure $next
     * @return mixed
     */
    public function handle($request, Closure $next, $module)
    {
        if (Helpers::module_permission_check($module)) {
            return $next($request);
        }

        Toastr::error('Access Denied !');
        return back();
    }
}

Zerion Mini Shell 1.0