plank/publisher

View on GitHub
src/Middleware/PublisherMiddleware.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace Plank\Publisher\Middleware;

use Closure;
use Illuminate\Http\Request;
use Plank\Publisher\Facades\Publisher;

class PublisherMiddleware
{
    public function handle(Request $request, Closure $next)
    {
        if (Publisher::shouldEnableDraftContent($request)) {
            Publisher::allowDraftContent();
        }

        return $next($request);
    }
}