for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Http\Middleware;
class AcceptsAjaxOnly
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle($request, \Closure $next, $guard = null)
$guard
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
if($request->ajax())
return $next($request);
abort('404');
}
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.