@@ -45,7 +45,7 @@ |
||
| 45 | 45 | ])); |
| 46 | 46 | |
| 47 | 47 | return response()->json([ |
| 48 | - 'url' => route('vendor.laravel-pdf-tinker.download', ['alias' => $filename]) |
|
| 48 | + 'url' => route('vendor.laravel-pdf-tinker.download', [ 'alias' => $filename ]) |
|
| 49 | 49 | ]); |
| 50 | 50 | } catch (Exception $e) { |
| 51 | 51 | return response()->json([ |
@@ -6,19 +6,19 @@ |
||
| 6 | 6 | Route::group([ |
| 7 | 7 | 'prefix' => config('laravel-pdf-tinker.route_prefix'), |
| 8 | 8 | 'as' => 'vendor.laravel-pdf-tinker.' |
| 9 | -], function () { |
|
| 10 | - Route::get('/playground', [PlaygroundController::class, 'index']) |
|
| 9 | +], function() { |
|
| 10 | + Route::get('/playground', [ PlaygroundController::class, 'index' ]) |
|
| 11 | 11 | ->name('playground'); |
| 12 | 12 | |
| 13 | - Route::post('/preview', [PlaygroundController::class, 'preview']) |
|
| 13 | + Route::post('/preview', [ PlaygroundController::class, 'preview' ]) |
|
| 14 | 14 | ->name('preview'); |
| 15 | 15 | |
| 16 | - Route::get('/pdf/{alias}', [PlaygroundController::class, 'download']) |
|
| 16 | + Route::get('/pdf/{alias}', [ PlaygroundController::class, 'download' ]) |
|
| 17 | 17 | ->name('download'); |
| 18 | 18 | |
| 19 | - Route::get('/css', [PlaygroundController::class, 'css']) |
|
| 19 | + Route::get('/css', [ PlaygroundController::class, 'css' ]) |
|
| 20 | 20 | ->name('css'); |
| 21 | 21 | |
| 22 | - Route::get('/js', [PlaygroundController::class, 'js']) |
|
| 22 | + Route::get('/js', [ PlaygroundController::class, 'js' ]) |
|
| 23 | 23 | ->name('js'); |
| 24 | 24 | }); |
@@ -12,13 +12,13 @@ discard block |
||
| 12 | 12 | public function register() |
| 13 | 13 | { |
| 14 | 14 | /** Bind the manager in the container, to allow addition of drivers */ |
| 15 | - $this->app->singleton(PdfTinkerManager::class, function () { |
|
| 15 | + $this->app->singleton(PdfTinkerManager::class, function() { |
|
| 16 | 16 | return new PdfTinkerManager; |
| 17 | 17 | }); |
| 18 | 18 | |
| 19 | 19 | /** Bind the DomPDF driver on the manager */ |
| 20 | - $this->app->resolving(PdfTinkerManager::class, function (PdfTinkerManager $manager) { |
|
| 21 | - $manager->extend('dompdf', function () { |
|
| 20 | + $this->app->resolving(PdfTinkerManager::class, function(PdfTinkerManager $manager) { |
|
| 21 | + $manager->extend('dompdf', function() { |
|
| 22 | 22 | $dompdf = new \Dompdf\Dompdf(); |
| 23 | 23 | $dompdf->setBasePath(realpath(base_path('public'))); |
| 24 | 24 | |
@@ -27,14 +27,14 @@ discard block |
||
| 27 | 27 | }); |
| 28 | 28 | |
| 29 | 29 | /** Bind the Wkhtmltopdf driver on the manager */ |
| 30 | - $this->app->resolving(PdfTinkerManager::class, function (PdfTinkerManager $manager) { |
|
| 31 | - $manager->extend('wkhtmltopdf', function () { |
|
| 30 | + $this->app->resolving(PdfTinkerManager::class, function(PdfTinkerManager $manager) { |
|
| 31 | + $manager->extend('wkhtmltopdf', function() { |
|
| 32 | 32 | return new WkhtmltopdfDriver(new \mikehaertl\wkhtmlto\Pdf); |
| 33 | 33 | }); |
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | 36 | /** Make sure we can type hint the Filesystem in our controller. */ |
| 37 | - $this->app->bind(\League\Flysystem\Filesystem::class, function () { |
|
| 37 | + $this->app->bind(\League\Flysystem\Filesystem::class, function() { |
|
| 38 | 38 | return new \League\Flysystem\Filesystem( |
| 39 | 39 | new \League\Flysystem\Adapter\Local(storage_path('/')) |
| 40 | 40 | ); |