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 11<?php
22
33$ finder = PhpCsFixer \Finder::create ()
4+ ->in (__DIR__ . '/config ' )
45 ->in (__DIR__ . '/src ' )
56;
67
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
1212
1313Make sure you have access to a valid composer token from typeset.sh.
1414
15- Add typeset.sh packages repository to composer.
15+ Add typeset.sh package repository to composer and install the package via composer:
1616
1717 composer config repositories.typesetsh composer https://packages.typeset.sh
1818 composer require typesetsh/laravel-wrapper
1919
20+ The package will be automatically discovered in your application thanks to [ package auto-discovery] ( https://laravel.com/docs/8.x/packages#package-discovery ) .
2021
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-
3722## Usage
3823
3924The 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 77 {
88 "name" : " Jacob Siefer" ,
99 "email" : " jacob@typeset.sh"
10+ },
11+ {
12+ "name" : " Rouven Alexander Rieker" ,
13+ "email" : " therouv@googlemail.com"
1014 }
1115 ],
1216 "minimum-stability" : " stable" ,
1519 "typesetsh/typesetsh" : " ^0.14"
1620 },
1721 "require-dev" : {
18- "friendsofphp/php-cs-fixer" : " ^2.17@dev" ,
19- "phan/phan" : " dev-master"
22+ "friendsofphp/php-cs-fixer" : " ^2.16"
2023 },
2124 "autoload" : {
2225 "psr-4" : {
2326 "Typesetsh\\ LaravelWrapper\\ " : " src/"
2427 },
25- "files" : [" src/helper.php" ]
28+ "files" : [
29+ " src/helper.php"
30+ ]
2631 },
27- "autoload-dev" : {
28- "psr-4" : {
29- "Typesetsh\\ LaravelWrapper\\ " : " tests/unit/"
32+ "extra" : {
33+ "laravel" : {
34+ "providers" : [
35+ " Typesetsh\\ LaravelWrapper\\ TypesetServiceProvider"
36+ ]
3037 }
3138 },
32- "repositories" : [{
39+ "repositories" : [
40+ {
3341 "type" : " composer" ,
3442 "url" : " https://packages.typeset.sh"
3543 }
Original file line number Diff line number Diff line change 1212 |
1313 */
1414
15- 'allowed_directories ' => [public_path ()],
15+ 'allowed_directories ' => [
16+ public_path (),
17+ ],
1618
1719 /*
1820 |--------------------------------------------------------------------------
Original file line number Diff line number Diff line change 11<?php
22/**
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.
65 */
76
7+ declare (strict_types=1 );
8+
89namespace Typesetsh \LaravelWrapper \Facades ;
910
10- use Typesetsh \LaravelWrapper \PdfView ;
11+ use Typesetsh \LaravelWrapper \Pdf \ View ;
1112
1213/**
13- * @method static PdfView make($view, array $data = [], array $mergeData = [])
14+ * @method static View make($view, array $data = [], array $mergeData = [])
1415 */
1516class Pdf extends \Illuminate \Support \Facades \Facade
1617{
Original file line number Diff line number Diff line change 11<?php
22/**
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.
65 */
6+
77declare (strict_types=1 );
88
99namespace Typesetsh \LaravelWrapper \Pdf ;
Original file line number Diff line number Diff line change 11<?php
22/**
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.
65 */
6+
77declare (strict_types=1 );
88
99namespace Typesetsh \LaravelWrapper \Pdf ;
1010
1111use Illuminate \Contracts \Support \Renderable ;
1212use Illuminate \Contracts \Support \Responsable ;
1313use Illuminate \Contracts \View \View as HtmlView ;
14+ use Illuminate \Http \Request ;
1415use Symfony \Component \HttpFoundation \StreamedResponse ;
1516use Typesetsh \LaravelWrapper \Typesetsh ;
1617
@@ -54,7 +55,7 @@ public function render(): string
5455 /**
5556 * Create an HTTP response that represents the object.
5657 *
57- * @param \Illuminate\Http\ Request $request
58+ * @param Request $request
5859 */
5960 public function toResponse ($ request ): StreamedResponse
6061 {
Original file line number Diff line number Diff line change 11<?php
22/**
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.
65 */
6+
77declare (strict_types=1 );
88
99namespace Typesetsh \LaravelWrapper ;
Original file line number Diff line number Diff line change 11<?php
22/**
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.
65 */
6+
77declare (strict_types=1 );
88
99namespace Typesetsh \LaravelWrapper ;
Original file line number Diff line number Diff line change 11<?php
22/**
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.
65 */
76
87namespace typesetsh ;
You can’t perform that action at this time.
0 commit comments