供应商\ laravel \ framework \ src \ Illuminate \ Container \ Container.php中未捕获的异常'ReflectionException',消息'类配置不存在'

Fatal error: Uncaught exception 'ReflectionException' with message 'Class config does not exist' in D:\laragon\www\project\vendor\laravel\framework\src\Illuminate\Container\Container.php:738

I am trying to use dompdf in laravel and according to that documentation.

Lumen:

After updating composer add the following lines to register provider in bootstrap/app.php

$app->register(\Barryvdh\DomPDF\ServiceProvider::class);

To change the configuration, copy the config file to your config folder and enable it in bootstrap/app.php:

$app->configure('dompdf');

and i add that code in bootstrap/app.php like this

$app->register(\Barryvdh\DomPDF\ServiceProvider::class);
$app->configure('dompdf');

but i am geting that error.

$app->register(\Barryvdh\DomPDF\ServiceProvider::class); 

Added to a error dir,

You should register it in /root/config/app.php,

If you don't use Lumen, remove the configuration you've probably done, regarding instructions, in bootsrap/app.php