Skip to content

Commit 8b79810

Browse files
author
Holger Lösken
committed
Remove old reference to L5, unsupported
1 parent 9c5ac93 commit 8b79810

File tree

1 file changed

+3
-59
lines changed

1 file changed

+3
-59
lines changed

README.md

+3-59
Original file line numberDiff line numberDiff line change
@@ -6,77 +6,21 @@
66
[![StyleCI](https://styleci.io/repos/59506451/shield)](https://styleci.io/repos/59506451)
77
[![License](https://poser.pugx.org/codedge/laravel-fpdf/license?format=flat-square)](https://packagist.org/packages/codedge/laravel-fpdf)
88

9-
This repository implements a simple [ServiceProvider](https://laravel.com/docs/master/providers)
10-
that creates a singleton instance of the Fpdf PDF library - easily accessible via a [Facade](https://laravel.com/docs/master/facades) in [Laravel](https://laravel.com/).
11-
12-
See [FPDF homepage](http://www.fpdf.org/) for more information about the usage.
9+
Using [FPDF](http://www.fpdf.org/) made easy with Laravel. See [FPDF homepage](http://www.fpdf.org/) for more information about the usage.
1310

1411
## Installation using [Composer](https://getcomposer.org/)
1512
```sh
1613
$ composer require codedge/laravel-fpdf
1714
```
1815

19-
## Usage
20-
21-
### Laravel >= 5.5
22-
Enjoy the auto discovery feature.
23-
24-
### Laravel <5.5
25-
To use the static interfaces (facades) you need to add the following lines to your `config/app.php`. The `[1]` is for
26-
registering the service provider, the `[2]` are for specifying the facades:
27-
28-
```php
29-
// config/app.php
30-
31-
return [
32-
33-
//...
34-
35-
'providers' => [
36-
// ...
37-
38-
/*
39-
* Application Service Providers...
40-
*/
41-
// ...
42-
Codedge\Fpdf\FpdfServiceProvider::class, // [1]
43-
],
44-
45-
// ...
46-
47-
'aliases' => [
48-
// ...
49-
'Fpdf' => Codedge\Fpdf\Facades\Fpdf::class, // [2]
50-
]
51-
```
52-
53-
Now you can use the facades in your application.
16+
## Configuration
5417

55-
## Configuration (optional)
5618
Run
5719
`php artisan vendor:publish --provider="Codedge\Fpdf\FpdfServiceProvider" --tag=config`
5820
to publish the configuration file to `config/fpdf.php`.
59-
60-
Open this file and enter the correct page settings, if you do not want the defaults.
6121

62-
## Basic example
6322

64-
If you want to use the facade you can see a basic example here:
65-
66-
```php
67-
// app/Http/routes.php | app/routes/web.php
68-
69-
Route::get('/', function () {
70-
71-
Fpdf::AddPage();
72-
Fpdf::SetFont('Courier', 'B', 18);
73-
Fpdf::Cell(50, 25, 'Hello World!');
74-
Fpdf::Output();
75-
76-
});
77-
```
78-
79-
Of course you can also inject the singleton instance via dependency injection. See an example here:
23+
## Usage
8024

8125
```php
8226
// app/Http/routes.php | app/routes/web.php

0 commit comments

Comments
 (0)