forked from s421507/eOSP2
Dokumenty
This commit is contained in:
parent
d25c6c6b02
commit
e21a6ebb54
16
app/Http/Controllers/pdfController.php
Normal file
16
app/Http/Controllers/pdfController.php
Normal 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;
|
||||
}
|
||||
}
|
@ -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
1211
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -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
29
config/fpdf.php
Normal 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),
|
||||
|
||||
];
|
@ -106,3 +106,5 @@ Route::get('register/verify/{confirmationCode}', [
|
||||
//Auth::routes();
|
||||
//
|
||||
//Route::get('/home', 'HomeController@index')->name('home');
|
||||
|
||||
Route::get('/pdf', 'pdfController@createView');
|
||||
|
Loading…
Reference in New Issue
Block a user