1
<?php
2

3
namespace Nuwave\Lighthouse\Events;
4

5
use Illuminate\Http\Request;
6
use Illuminate\Support\Carbon;
7

8
/**
9
 * Fires right after a request reaches the GraphQLController.
10
 *
11
 * Can be used for logging or for measuring and monitoring
12
 * the time a request takes to resolve.
13
 *
14
 * @see \Nuwave\Lighthouse\Support\Http\Controllers\GraphQLController
15
 */
16
class StartRequest
17
{
18
    /**
19
     * HTTP request instance.
20
     *
21
     * @var \Illuminate\Http\Request
22
     */
23
    public $request;
24

25
    /**
26
     * The point in time when the request started.
27
     *
28
     * @var \Illuminate\Support\Carbon
29
     */
30
    public $moment;
31

32 1
    public function __construct(Request $request)
33
    {
34 1
        $this->request = $request;
35 1
        $this->moment = Carbon::now();
36
    }
37
}

Read our documentation on viewing source code .

Loading