for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SoufieneSlimi\TemplateOperation;
use Template;
use Closure;
class ApplyTemplate
{
/**
* 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.
$template = Template::find($request->template_id);
if ($template) {
$template->apply();
}
return $next($request);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.