goodnesskay/laravelpdfviewer
最新稳定版本:v1.0
Composer 安装命令:
composer require goodnesskay/laravelpdfviewer
包简介
A Laravel Package for viewing PDF files or documents on Web App
README 文档
README
This package is meant to help with viewing portable document file(PDF) on the web seamlessly when developing with Laravel. The package makes use of ViewerJS
Requirement
Installation
To install into your project, run the command below in your terminal.
composer require goodnesskay/laravelpdfviewer
Once the package is done being installed, register the service provider. Open config/app.php and add the following to the providers key.
Goodnesskay\LaravelPdfViewer\LaravelPdfViewerServiceProvider::class,
Configure
Run this in your terminal:
php artisan vendor:publish --provider="Goodnesskay\LaravelPdfViewer\LaravelPdfViewerServiceProvider"
It will publish a folder named laraview to the root folder of your project.
How it Works
Simple!!! After installations and configurations have been carried out successfully, add the code below to your html file
{{ asset('/laraview/#../folder-name/the-pdf-file.pdf') }}
It should look like this:
<iframe src ="{{ asset('/laraview/#../pdf/test.pdf') }}" width="1000px" height="600px"></iframe>
Then, you should have something like this:
Note:
After
#../in{{ asset('/laraview/#../folder-name/the-pdf-file.pdf') }}, what should follow is the folder name of the pdf files in the public folder then, the pdf file name can follow.
Contribute
You can fork this package, contribute and submit a pull request. I will really love it.
You want to appreciate me?
You can appreciate me by starring this repository and follow me on Github , twitter and subscribe to my Youtube Channel!
I love you like mad.
Goodness Kayode | Pusher of Codes
License
MIT License (MIT).
统计信息
- 总下载量: 49.25k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 89
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-23
