Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
37 | public function handle() |
||
38 | { |
||
39 | // |
||
40 | $headers = [ |
||
41 | 'Content-type' => 'text/txt', |
||
42 | ]; |
||
43 | $p_id = 0; |
||
44 | $f_id = $this->family_id; |
||
45 | $up_nest = 3; |
||
46 | $down_nest = 3; |
||
47 | $writer = new GedcomGenerator($p_id, $f_id, $up_nest, $down_nest); |
||
48 | $content = $writer->getGedcomPerson(); |
||
49 | // $user_id = Auth::user()->id; |
||
50 | $ts = microtime(true); |
||
51 | $file = env('APP_NAME').date('_Ymd_').$ts.'.GED'; |
||
52 | $destinationPath = public_path().'/upload/'; |
||
53 | if (! is_dir($destinationPath)) { |
||
54 | mkdir($destinationPath, 0777, true); |
||
55 | } |
||
56 | File::put($destinationPath.$file, $content); |
||
57 | |||
58 | return 0; |
||
59 | } |
||
61 |