Firstly, I have deployed a Laravel project from Windows to server by copying everything in my Laravel folder and upload them to server, after configuring .htaccess, it ran successfully.
And then, I added a new package named "dompdf" by using command line, and it ran successfully in my Windows local. But I don't know how to deploy this package to linux server. I have tried but it failed.
Do I have to install composer on the Linux server?
Do I need to re-install again on the Linux server?
I have asked some people. But they have always said that "you have to install composer on Linux server". But I realize that I do not need to install anything at all. I just uploaded and override file app/config/app.php and some folders in the vendor folder that are new or changed after I added the package "dompdf".
Sorry about my English. If something is wrong, please correct it for me.
You need to install the package using Composer :
1) Require this package in your composer.json
:
'barryvdh/laravel-dompdf": "0.4.*'
2) do a composer update from your terminal: php composer.phar update
3) After updating composer, add the ServiceProvider to the providers array in app/config/app.php
'Barryvdh\DomPDF\ServiceProvider',
4) You can optionally use the facade for shorter code. Add this to your facades:
'PDF' => 'Barryvdh\DomPDF\Facade',
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.