After the installation process is finished, in order to properly register the service provider and alias, you should insert the following lines into the config/app.php file:
'providers' => ServiceProvider::defaultProviders()->merge([
// ...
BarryvdhDomPDFServiceProvider::class,
],
'aliases' => Facade::defaultAliases()->merge([
// ...
'PDF' => BarryvdhDomPDFFacade::class,
],
However, it is important to note that an error may occur indicating that ‘BarryvdhDomPDFFacade’ is an Undefined type.
I have verified that the domPDF package has been successfully installed.