for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace WebDevEtc\BlogEtc\Middleware;
use Closure;
use WebDevEtc\BlogEtc\Helpers;
class UserCanManageBlogPosts
{
public function handle($request, Closure $next)
abort_if(
!Helpers::hasAdminGateAccess(),
401,
'User not authorised to manage blog posts'
);
return $next($request);
}