App\Http\Controllers\Forum\ForumCoversController::__construct PHP Method

__construct() public method

public __construct ( )
    public function __construct()
    {
        parent::__construct();
        view()->share('current_action', 'forum-forum-covers-' . current_action());
        $this->middleware('auth', ['only' => ['destroy', 'store', 'update']]);
        $this->middleware(function ($request, $next) {
            if (Auth::check() && !Auth::user()->isAdmin()) {
                abort(403);
            }
            return $next($request);
        });
    }