SeedPdfLayoutsTable::run()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 8
nc 2
nop 0
1
<?php namespace VojtaSvoboda\UserPdfExport\Updates;
2
3
use File;
4
use Renatio\DynamicPDF\Models\Layout;
5
use Schema;
6
use Seeder;
7
8
class SeedPdfLayoutsTable extends Seeder
9
{
10
    public function run()
11
    {
12
        if (!Schema::hasTable('renatio_dynamicpdf_pdf_layouts')) {
13
            return false;
14
        }
15
16
        Layout::create([
17
            'name' => 'Users PDF layout',
18
            'code' => 'rainlab::user',
19
            'content_html' => File::get(__DIR__ . '/templates/layout.htm'),
20
            'content_css' => File::get(__DIR__ . '/templates/style.css'),
21
        ]);
22
    }
23
}
24