22
33namespace FamilyTree365 \LaravelGedcom \Commands ;
44
5- use Illuminate \Console \Command ;
6- use Illuminate \Support \Facades \Storage ;
75use FamilyTree365 \LaravelGedcom \Models \Person ;
8- use FamilyTree365 \ LaravelGedcom \ Models \ Subm ;
6+ use Illuminate \ Console \ Command ;
97use Illuminate \Support \Facades \DB ;
8+ use Illuminate \Support \Facades \Storage ;
109use Illuminate \Support \Facades \View ;
1110
1211class GedcomExporter extends Command
@@ -42,12 +41,11 @@ public function __construct()
4241 */
4342 public function handle ()
4443 {
44+ $ dir = 'public/gedcom/exported ' ;
4545
46- $ dir = 'public/gedcom/exported ' ;
47-
48- $ filename = $ this ->argument ('filename ' ).".GED " ;
46+ $ filename = $ this ->argument ('filename ' ).'.GED ' ;
4947
50- $ file_path = $ dir . '/ ' . $ filename ;
48+ $ file_path = $ dir. '/ ' . $ filename ;
5149
5250 if (!file_exists ($ dir )) {
5351 Storage::makeDirectory ($ dir );
@@ -69,10 +67,10 @@ public function handle()
6967 $ people = Person::all ();
7068 $ submissions = $ query ->get ();
7169
72- $ data =array (
70+ $ data = [
7371 'submissions ' => $ submissions ,
74- 'people ' => $ people ,
75- ) ;
72+ 'people ' => $ people ,
73+ ] ;
7674
7775 $ source = View::make ('stubs.ged ' , $ data )->render ();
7876
@@ -84,9 +82,8 @@ public function handle()
8482
8583 fclose ($ handle );
8684
87- $ headers = array (
85+ $ headers = [
8886 'Content-Type ' => 'text/ged ' ,
89- );
90-
87+ ];
9188 }
9289}
0 commit comments