The view function retrieves a view instance:
<?php return view('auth.login');
<?php     public function it_can_remove_view_data()

    {

        Route::get('exception', function () {

            return view('blade-exception', ['foo' => 'bar']);

        });



        $this->get('/exception');
<?php         $this->app['config']['flare.reporting.report_view_data'] = false;



        Route::get('exception', function () {

            return view('blade-exception', ['foo' => 'bar']);

        });



        $this->get('/exception');
<?php         ];



        try {

            view('undefined-variable-1', $viewData)->render();

        } catch (ViewException $exception) {

            $viewException = $exception;

        }
<?php     {

        $this->expectException(ViewException::class);



        view('blade-exception')->render();

    }
<?php     public function it_detects_the_original_line_number_in_view_exceptions()

    {

        try {

            view('blade-exception')->render();

        } catch (ViewException $exception) {

            $this->assertSame(3, $exception->getLine());

        }
<?php     public function it_detects_the_original_line_number_in_view_exceptions_with_utf8_characters()

    {

        try {

            view('blade-exception-utf8')->render();

        } catch (ViewException $exception) {

            $this->assertSame(11, $exception->getLine());

        }
<?php         ];



        try {

            view('blade-exception', $viewData)->render();

        } catch (ViewException $exception) {

            $this->assertSame($viewData, $exception->getViewData());

        }
<?php     {

        try {

            $exception = new ExceptionWithSolution;

            view('solution-exception', ['exception' => $exception])->render();

        } catch (ViewException $exception) {

            $this->assertTrue($exception instanceof ViewExceptionWithSolution);

            $this->assertInstanceOf(Solution::class, $exception->getSolution());
<?php     {

        $this->expectException(ViewException::class);



        view('php-exception')->render();

    }

}