for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Rinvex\Fort\Http\Middleware;
use Closure;
use Carbon\Carbon;
use Illuminate\Http\Request;
class UpdateLastActivity
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)
return $next($request);
}
* Perform any final actions for the request lifecycle.
* @param \Symfony\Component\HttpFoundation\Response $response
* @return void
public function terminate($request, $response)
$response
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$user = $request->user();
$user->timestamps = false;
$user->fill(['last_activity' => new Carbon()])->forceSave();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.