@@ -48,12 +48,12 @@ |
||
| 48 | 48 | $content = $writer->getGedcomPerson(); |
| 49 | 49 | // $user_id = Auth::user()->id; |
| 50 | 50 | $ts = microtime(true); |
| 51 | - $file = env('APP_NAME').date('_Ymd_').$ts.'.GED'; |
|
| 52 | - $destinationPath = public_path().'/upload/'; |
|
| 53 | - if (! is_dir($destinationPath)) { |
|
| 51 | + $file = env('APP_NAME') . date('_Ymd_') . $ts . '.GED'; |
|
| 52 | + $destinationPath = public_path() . '/upload/'; |
|
| 53 | + if (!is_dir($destinationPath)) { |
|
| 54 | 54 | mkdir($destinationPath, 0777, true); |
| 55 | 55 | } |
| 56 | - File::put($destinationPath.$file, $content); |
|
| 56 | + File::put($destinationPath . $file, $content); |
|
| 57 | 57 | |
| 58 | 58 | return 0; |
| 59 | 59 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $status = 'queue'; |
| 56 | 56 | |
| 57 | 57 | |
| 58 | - if($this->conn === 'tenant') { |
|
| 58 | + if ($this->conn === 'tenant') { |
|
| 59 | 59 | $key = 'database.connections.tenant.database'; |
| 60 | 60 | $value = $this->db; |
| 61 | 61 | config([$key => $value]); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | foreach ($dnas as $dna) { |
| 42 | 42 | // system('/usr/bin/python3 /home/genealogia/public_html/dna.py ' . $this->var_name . ' ' . $dna->variable_name . ' ' . '/home/genealogia/public_html/storage/app/dna/'. $this->file_name . ' ' . '/home/genealogia/public_html/storage/app/dna/'. $dna->file_name); |
| 43 | 43 | chdir('/var/www/api.familytree365.com/app'); |
| 44 | - exec('python3 dna.py ' . $this->var_name . ' ' . $dna->variable_name . ' ' . $this->file_name . ' ' . $dna->file_name); |
|
| 44 | + exec('python3 dna.py ' . $this->var_name . ' ' . $dna->variable_name . ' ' . $this->file_name . ' ' . $dna->file_name); |
|
| 45 | 45 | $dm = new DM(); |
| 46 | 46 | $dm->user_id = $user->id; |
| 47 | 47 | $dm->image = 'shared_dna_' . $this->var_name . '_' . $dna->variable_name . '.png'; |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | foreach ($dnas as $dna) { |
| 42 | 42 | // system('/usr/bin/python3 /home/genealogia/public_html/dna.py ' . $this->var_name . ' ' . $dna->variable_name . ' ' . '/home/genealogia/public_html/storage/app/dna/'. $this->file_name . ' ' . '/home/genealogia/public_html/storage/app/dna/'. $dna->file_name); |
| 43 | 43 | chdir('/var/www/api.familytree365.com/app'); |
| 44 | - exec('python3 dna.py ' . $this->var_name . ' ' . $dna->variable_name . ' ' . $this->file_name . ' ' . $dna->file_name); |
|
| 44 | + exec('python3 dna.py ' . $this->var_name . ' ' . $dna->variable_name . ' ' . $this->file_name . ' ' . $dna->file_name); |
|
| 45 | 45 | $dm = new DM(); |
| 46 | 46 | $dm->user_id = $user->id; |
| 47 | 47 | $dm->image = 'shared_dna_' . $this->var_name . '_' . $dna->variable_name . '.png'; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $this->configureRateLimiting(); |
| 39 | 39 | |
| 40 | - $this->routes(function () { |
|
| 40 | + $this->routes(function() { |
|
| 41 | 41 | Route::prefix('api') |
| 42 | 42 | ->middleware('api') |
| 43 | 43 | ->namespace($this->namespace) |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | protected function configureRateLimiting() |
| 58 | 58 | { |
| 59 | - RateLimiter::for('api', function (Request $request) { |
|
| 59 | + RateLimiter::for ('api', function(Request $request) { |
|
| 60 | 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); |
| 61 | 61 | }); |
| 62 | 62 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | protected function commands() |
| 36 | 36 | { |
| 37 | - $this->load(__DIR__.'/Commands'); |
|
| 37 | + $this->load(__DIR__ . '/Commands'); |
|
| 38 | 38 | |
| 39 | 39 | require base_path('routes/console.php'); |
| 40 | 40 | } |