master

laravel/framework

Last updated at: 29/12/2023 09:23

RequestHandled.php

TLDR

This file defines the RequestHandled class, which represents an event that is fired after a request has been handled.

Classes

RequestHandled

The RequestHandled class represents an event that is fired after a request has been handled. It has the following properties:

  • $request: The request instance of type \Illuminate\Http\Request.
  • $response: The response instance of type \Illuminate\Http\Response.

The class has a constructor method that accepts a request object and a response object as arguments and assigns them to the respective properties.

<?php

namespace Illuminate\Foundation\Http\Events;

class RequestHandled
{
    /**
     * The request instance.
     *
     * @var \Illuminate\Http\Request
     */
    public $request;

    /**
     * The response instance.
     *
     * @var \Illuminate\Http\Response
     */
    public $response;

    /**
     * Create a new event instance.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Illuminate\Http\Response  $response
     * @return void
     */
    public function __construct($request, $response)
    {
        $this->request = $request;
        $this->response = $response;
    }
}