1
0
forked from s421507/eOSP2

Dokumenty

This commit is contained in:
czup 2020-01-05 00:24:24 +01:00
parent d25c6c6b02
commit e21a6ebb54
6 changed files with 741 additions and 520 deletions

View File

@ -0,0 +1,16 @@
<?php
namespace App\Http\Controllers;
use Codedge\Fpdf\Fpdf\Fpdf;
class pdfController extends Controller
{
public function createView(){
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output();
exit;
}
}

View File

@ -9,6 +9,7 @@
"license": "MIT",
"require": {
"php": "^7.1.3",
"codedge/laravel-fpdf": "^1.5",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0"

1211
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -174,7 +174,6 @@ return [
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
/*
@ -223,7 +222,6 @@ return [
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
],
];

29
config/fpdf.php Normal file
View File

@ -0,0 +1,29 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default configuration for FPDF
|--------------------------------------------------------------------------
|
| Specify the default values for creating a PDF with FPDF
|
*/
'orientation' => 'P',
'unit' => 'mm',
'size' => 'A4',
/*
|--------------------------------------------------------------------------
| With Laravel Vapor hosting
|--------------------------------------------------------------------------
|
| If the application is to be hosted in the Laravel Vapor hosting platform,
| a special header needs to be attached to each download response.
|
*/
'useVaporHeaders' => env('FPDF_VAPOR_HEADERS', false),
];

View File

@ -106,3 +106,5 @@ Route::get('register/verify/{confirmationCode}', [
//Auth::routes();
//
//Route::get('/home', 'HomeController@index')->name('home');
Route::get('/pdf', 'pdfController@createView');