for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Middlewares;
use App\Middlewares\Contracts\IMiddleware;
abstract class BaseMiddleware implements IMiddleware
{
protected $next;
public function __construct($next)
if ($next instanceof IMiddleware) {
$this->next = $next;
}
public function handleNext()
if (!is_null($this->next)) {
$this->next->handle();