I am trying to make pdf using baaryvdh/dompdf in laravel but while installing the package using the command:

`composer require barryvdh/laravel-dompdf`

getting the error:

Using version ^0.9.0 for barryvdh/laravel-dompdf
./composer.json has been updated
Running composer update barryvdh/laravel-dompdf
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/ui[v3.0.0, ..., v3.2.0] require illuminate/console ^8.0 -> found illuminate/console[v8.0.0, ..., v8.36.2] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires laravel/ui ^3.0 -> satisfiable by laravel/ui[v3.0.0, v3.1.0, v3.2.0].
1

There are 1 best solutions below

3
On

Run below command

composer require barryvdh/laravel-dompdf:0.8.5

But Remember above version needs, This package requires php ^7.1.3.

Because if will not pass version bydefault it will take latest version and the latest version of dompdf is supported with laravel 8 and laravel ui 3.x

or

Please run "Composer update" Command

And Then Run

composer require barryvdh/laravel-dompdf:0.8.5

Hope this will work for you.