Package Data | |
---|---|
Maintainer Username: | goodnesskay |
Maintainer Contact: | gtkbrain@gmail.com (Goodness Toluwanimi Kayode) |
Package Create Date: | 2017-01-25 |
Package Last Update: | 2017-07-02 |
Home Page: | https://goodnesskayode.me |
Language: | JavaScript |
License: | MIT |
Last Refreshed: | 2024-11-22 03:01:56 |
Package Statistics | |
---|---|
Total Downloads: | 43,584 |
Monthly Downloads: | 377 |
Daily Downloads: | 7 |
Total Stars: | 89 |
Total Watchers: | 6 |
Total Forks: | 50 |
Total Open Issues: | 12 |
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
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,
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.
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.
You can fork
this package, contribute
and submit a pull request
. I will really love it.
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
MIT License (MIT).