| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace VojtaSvoboda\UserExportPdf\Updates; |
||
| 11 | public function run() |
||
| 12 | { |
||
| 13 | if (!Schema::hasTable('renatio_dynamicpdf_pdf_templates')) { |
||
| 14 | return false; |
||
| 15 | } |
||
| 16 | |||
| 17 | $layout = Layout::where('code', 'rainlab::user')->first(); |
||
| 18 | |||
| 19 | Template::create([ |
||
| 20 | 'title' => 'User profile', |
||
| 21 | 'description' => "User's PDF card template", |
||
| 22 | 'layout' => $layout, |
||
| 23 | 'code' => 'rainlab::user', |
||
| 24 | 'content_html' => File::get(__DIR__ . '/templates/user.htm'), |
||
| 25 | ]); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |