File tree Expand file tree Collapse file tree 10 files changed +43
-46
lines changed Expand file tree Collapse file tree 10 files changed +43
-46
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
$ finder = PhpCsFixer \Finder::create ()
4
+ ->in (__DIR__ . '/config ' )
4
5
->in (__DIR__ . '/src ' )
5
6
;
6
7
Original file line number Diff line number Diff line change @@ -12,28 +12,13 @@ in your laravel project. Typeset.sh is a printcss layout and rendering engine wr
12
12
13
13
Make sure you have access to a valid composer token from typeset.sh.
14
14
15
- Add typeset.sh packages repository to composer.
15
+ Add typeset.sh package repository to composer and install the package via composer:
16
16
17
17
composer config repositories.typesetsh composer https://packages.typeset.sh
18
18
composer require typesetsh/laravel-wrapper
19
19
20
+ The package will be automatically discovered in your application thanks to [ package auto-discovery] ( https://laravel.com/docs/8.x/packages#package-discovery ) .
20
21
21
- Then add the following line to register provider in ` config/app.php `
22
- ``` php
23
- 'providers' => [
24
-
25
- // ...
26
-
27
- App\Providers\AppServiceProvider::class,
28
- App\Providers\AuthServiceProvider::class,
29
- App\Providers\EventServiceProvider::class,
30
- App\Providers\RouteServiceProvider::class,
31
- [+] Typesetsh\LaravelWrapper\ServiceProvider::class,
32
-
33
- ],
34
- ```
35
-
36
-
37
22
## Usage
38
23
39
24
The wrapper works similar to the view. Technically it wraps the view and uses its html output
Original file line number Diff line number Diff line change 7
7
{
8
8
"name" : " Jacob Siefer" ,
9
9
10
+ },
11
+ {
12
+ "name" : " Rouven Alexander Rieker" ,
13
+
10
14
}
11
15
],
12
16
"minimum-stability" : " stable" ,
15
19
"typesetsh/typesetsh" : " ^0.14"
16
20
},
17
21
"require-dev" : {
18
- "friendsofphp/php-cs-fixer" : " ^2.17@dev" ,
19
- "phan/phan" : " dev-master"
22
+ "friendsofphp/php-cs-fixer" : " ^2.16"
20
23
},
21
24
"autoload" : {
22
25
"psr-4" : {
23
26
"Typesetsh\\ LaravelWrapper\\ " : " src/"
24
27
},
25
- "files" : [" src/helper.php" ]
28
+ "files" : [
29
+ " src/helper.php"
30
+ ]
26
31
},
27
- "autoload-dev" : {
28
- "psr-4" : {
29
- "Typesetsh\\ LaravelWrapper\\ " : " tests/unit/"
32
+ "extra" : {
33
+ "laravel" : {
34
+ "providers" : [
35
+ " Typesetsh\\ LaravelWrapper\\ TypesetServiceProvider"
36
+ ]
30
37
}
31
38
},
32
- "repositories" : [{
39
+ "repositories" : [
40
+ {
33
41
"type" : " composer" ,
34
42
"url" : " https://packages.typeset.sh"
35
43
}
Original file line number Diff line number Diff line change 12
12
|
13
13
*/
14
14
15
- 'allowed_directories ' => [public_path ()],
15
+ 'allowed_directories ' => [
16
+ public_path (),
17
+ ],
16
18
17
19
/*
18
20
|--------------------------------------------------------------------------
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * @copyright Copyright (c) 2020 Jacob Siefer
4
- *
5
- * @see LICENSE
3
+ * Copyright (c) 2020 Jacob Siefer
4
+ * See LICENSE bundled with this package for license details.
6
5
*/
7
6
7
+ declare (strict_types=1 );
8
+
8
9
namespace Typesetsh \LaravelWrapper \Facades ;
9
10
10
- use Typesetsh \LaravelWrapper \PdfView ;
11
+ use Typesetsh \LaravelWrapper \Pdf \ View ;
11
12
12
13
/**
13
- * @method static PdfView make($view, array $data = [], array $mergeData = [])
14
+ * @method static View make($view, array $data = [], array $mergeData = [])
14
15
*/
15
16
class Pdf extends \Illuminate \Support \Facades \Facade
16
17
{
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * @copyright Copyright (c) 2020 Jacob Siefer
4
- *
5
- * @see LICENSE
3
+ * Copyright (c) 2020 Jacob Siefer
4
+ * See LICENSE bundled with this package for license details.
6
5
*/
6
+
7
7
declare (strict_types=1 );
8
8
9
9
namespace Typesetsh \LaravelWrapper \Pdf ;
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * @copyright Copyright (c) 2020 Jacob Siefer
4
- *
5
- * @see LICENSE
3
+ * Copyright (c) 2020 Jacob Siefer
4
+ * See LICENSE bundled with this package for license details.
6
5
*/
6
+
7
7
declare (strict_types=1 );
8
8
9
9
namespace Typesetsh \LaravelWrapper \Pdf ;
10
10
11
11
use Illuminate \Contracts \Support \Renderable ;
12
12
use Illuminate \Contracts \Support \Responsable ;
13
13
use Illuminate \Contracts \View \View as HtmlView ;
14
+ use Illuminate \Http \Request ;
14
15
use Symfony \Component \HttpFoundation \StreamedResponse ;
15
16
use Typesetsh \LaravelWrapper \Typesetsh ;
16
17
@@ -54,7 +55,7 @@ public function render(): string
54
55
/**
55
56
* Create an HTTP response that represents the object.
56
57
*
57
- * @param \Illuminate\Http\ Request $request
58
+ * @param Request $request
58
59
*/
59
60
public function toResponse ($ request ): StreamedResponse
60
61
{
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * @copyright Copyright (c) 2020 Jacob Siefer
4
- *
5
- * @see LICENSE
3
+ * Copyright (c) 2020 Jacob Siefer
4
+ * See LICENSE bundled with this package for license details.
6
5
*/
6
+
7
7
declare (strict_types=1 );
8
8
9
9
namespace Typesetsh \LaravelWrapper ;
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * @copyright Copyright (c) 2020 Jacob Siefer
4
- *
5
- * @see LICENSE
3
+ * Copyright (c) 2020 Jacob Siefer
4
+ * See LICENSE bundled with this package for license details.
6
5
*/
6
+
7
7
declare (strict_types=1 );
8
8
9
9
namespace Typesetsh \LaravelWrapper ;
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * @copyright Copyright (c) 2020 Jacob Siefer
4
- *
5
- * @see LICENSE
3
+ * Copyright (c) 2020 Jacob Siefer
4
+ * See LICENSE bundled with this package for license details.
6
5
*/
7
6
8
7
namespace typesetsh ;
You can’t perform that action at this time.
0 commit comments