From 7bf19d3c010f0ccad79b39f77917a127560f8657 Mon Sep 17 00:00:00 2001 From: Petros Diveris Date: Sun, 3 Mar 2019 13:23:39 +0000 Subject: [PATCH 1/7] Not really part of this "sprint" however that's a fix that needed doing. The down function of this see reset the contents of the two new fields rather than altogether removing them from the schema. That has now been corrected. * Do a DB dump as I am not sure Laravel will not try to run the method (it most likely won't.) --- ..._02_13_200000_terms_add_content_fields.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/database/migrations/2019_02_13_200000_terms_add_content_fields.php b/database/migrations/2019_02_13_200000_terms_add_content_fields.php index f821f2aa..b2d00812 100644 --- a/database/migrations/2019_02_13_200000_terms_add_content_fields.php +++ b/database/migrations/2019_02_13_200000_terms_add_content_fields.php @@ -26,20 +26,9 @@ class TermsAddContentFields extends Migration */ public function down() { - // set term->content_* to '' - $terms = \App\Term::all(); - foreach ($terms as $i => $term) { - echo '\nDOWN! \n'; - echo 'Resetting '; - echo $term->id; - echo ' '; - echo $term->expression; - echo '...\n'; - $term->content_html = ''; - $term->content_markdown = ''; - - $term->save(); - } - + Schema::table('terms', function (Blueprint $table) { + $table->removeColumn('content_html'); + $table->removeColumn('content_markdown'); + }); } } -- GitLab From 94598144718a742cea22ecfa727aa8bbca01b593 Mon Sep 17 00:00:00 2001 From: Petros Diveris Date: Sun, 3 Mar 2019 14:44:38 +0000 Subject: [PATCH 2/7] Added migration tp split definitions content into html and markdown -same way as in terms table. Allow nulls was added as an afterthought. --- ..._131827_definitions_add_content_fields.php | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 database/migrations/2019_03_03_131827_definitions_add_content_fields.php diff --git a/database/migrations/2019_03_03_131827_definitions_add_content_fields.php b/database/migrations/2019_03_03_131827_definitions_add_content_fields.php new file mode 100644 index 00000000..9e0b34ac --- /dev/null +++ b/database/migrations/2019_03_03_131827_definitions_add_content_fields.php @@ -0,0 +1,43 @@ +mediumText('content_html') + ->nullable() + ->default('') + ->after('body'); + + $table->mediumText('content_markdown') + ->nullable() + ->default('') + ->after('content_html'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + Schema::table('definitions', function (Blueprint $table) { + $table->removeColumn('content_html'); + $table->removeColumn('content_markdown'); + }); + + } + } -- GitLab From 7295bb57cd6d0fff60aaba2d37edee51cd52f57d Mon Sep 17 00:00:00 2001 From: Petros Diveris Date: Sun, 3 Mar 2019 15:26:07 +0000 Subject: [PATCH 3/7] PLT (Czabo) friendly formatting. --- resources/views/term.blade.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/resources/views/term.blade.php b/resources/views/term.blade.php index d2e7ce05..665d532c 100644 --- a/resources/views/term.blade.php +++ b/resources/views/term.blade.php @@ -3,16 +3,12 @@ @include('partials.alphabet', array('alphabet' => $alphabet, 'letter'=>$letter, 'goto'=>'alphabet', 'column'=>'initial'))
- - -
{{$term->expression}} @@ -30,7 +26,6 @@
-
@if(null !== $term->time_point) @@ -56,7 +51,6 @@ - @@ -75,14 +69,12 @@

-
{!! $term->classic!!}
-
@@ -93,7 +85,7 @@ {{$definition->author}}, {{date('F j, Y, g:i a', strtotime($definition->time_point))}} , {{$definition->publication}} - {!! \App\Http\Controllers\DefinitioSiteController::parseDom($definition->body)!!} + {!! $definition->content_html!!} @endforeach
-- GitLab From d86f5d00ccac202133beb76c9280e3d6d934bd9f Mon Sep 17 00:00:00 2001 From: Petros Diveris Date: Sun, 3 Mar 2019 18:28:40 +0000 Subject: [PATCH 4/7] Bulk of work done for a first view on the edit component(s) and interface for definitions. A testbed blade was used (and has been added and will remain in the repo) called term_edit_2 which appears when adding a ?v=2 at the end of the term edit's URL e.g. https://definitio.div/engine/term/88?v=2 The story to use as a template will then be the one linked to above, under the term 'John.' The story itself lends itself to working on the dropcaps, either by automatically singling out the first character of the first para if it has for example more than three lines of text, or by adding to CKEditor the means (read button) to select a word and specify that it is to be displayed with a dropcap. In addition * Some fixed were made to the migration scripts for splitting/adding html/markup content in items * Added migrations to do the same for definitions table * Added the extra columns to the docblocks * Added definitions look to term_edit * Removed markup parsing of definitions on term's view template (we now expect the content to be, and we read it as, HTML) * Added bulma extensions divider and timeline - although I am currently (and sadly) freezing all efforts to implement a vertical tube map like timeline to the edit process - it's not that easy to squeeze the control in in a meaningful way and simply having it there because it looks good is against the building principles of definitio as well as aginter. . --- app/Definition.php | 4 + .../DefinitioApplicationManager.php | 7 +- .../DefinitioContentController.php | 20 +- .../Controllers/DefinitioSiteController.php | 22 +- ...02_definitions_populate_content_fields.php | 57 +++ resources/views/admin/term_edit.blade.php | 263 ++++++++----- resources/views/admin/term_edit_2.blade.php | 368 ++++++++++++++++++ resources/views/layouts/app.blade.php | 2 + resources/views/test.blade.php | 56 ++- 9 files changed, 672 insertions(+), 127 deletions(-) create mode 100644 database/migrations/2019_03_03_132702_definitions_populate_content_fields.php create mode 100644 resources/views/admin/term_edit_2.blade.php diff --git a/app/Definition.php b/app/Definition.php index b1c1a98b..dc49f7fb 100644 --- a/app/Definition.php +++ b/app/Definition.php @@ -16,6 +16,8 @@ * @property int|null $item_id * @property string|null $author * @property string|null $body + * @property string|null $content_html + * @property string|null $content_markdown * @property string|null $time_point * @property string|null $publication * @property string|null $src @@ -25,6 +27,8 @@ * @property string|null $deleted_at * @method static \Illuminate\Database\Eloquent\Builder|\App\Definition whereAuthor($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Definition whereBody($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Definition whereContentHtml($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Definition whereContentMarkdown($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Definition whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Definition whereDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Definition whereHeading($value) diff --git a/app/Http/Controllers/DefinitioApplicationManager.php b/app/Http/Controllers/DefinitioApplicationManager.php index 37c1d2d8..787427f8 100644 --- a/app/Http/Controllers/DefinitioApplicationManager.php +++ b/app/Http/Controllers/DefinitioApplicationManager.php @@ -80,15 +80,16 @@ $formUser->handle = ''; $method = 'POST'; - } - else { + } else { $formUser = \App\SiteUser::find($id); if (null === $formUser) { abort(404, "No such user exists. sorry.."); } } - + if ($request->getHost()=='definitio.div') { + dump($formUser); + } return \View::make('manager.user', [ 'formUser' => $formUser, diff --git a/app/Http/Controllers/DefinitioContentController.php b/app/Http/Controllers/DefinitioContentController.php index 1b8c4cc0..361e3853 100644 --- a/app/Http/Controllers/DefinitioContentController.php +++ b/app/Http/Controllers/DefinitioContentController.php @@ -93,7 +93,20 @@ foreach ($term->related as $rel) { $related[] = $rel->expression; } - + if ($request->get('v','')=='2') { + return \View::make('admin.term_edit_2', + [ + 'term' => $term, + 'alphabet' => $alphabet, + 'classic' => $term->classic, + 'letter' => $letter, + 'sourceLabel' => $source['label'][0], + 'sourceLink' => $source['href'][0], + 'related' => implode(',', $related), + 'method' => $method, + ]); + + }; return \View::make('admin.term_edit', [ 'term' => $term, @@ -183,7 +196,7 @@ ->with('message', 'Term updated'); } - return redirect('/engine/term/' . $id) + return redirect($request->getUri()) ->with('message', 'Term updated'); } } @@ -211,8 +224,7 @@ ->back() ->withErrors($validator->errors()) ; - } - else { + } else { $term = new \App\Term(); $term->expression = $request->input('expression'); diff --git a/app/Http/Controllers/DefinitioSiteController.php b/app/Http/Controllers/DefinitioSiteController.php index cb77264c..74e64eb2 100644 --- a/app/Http/Controllers/DefinitioSiteController.php +++ b/app/Http/Controllers/DefinitioSiteController.php @@ -228,11 +228,11 @@ } /** - * @param string $input + * @param string|null $input * @return string * @throws \Exception */ - public static function parseDom(string $input): string + public static function parseDom($input = ''): string { $Parsedown = new ParsedownExtra(); return $Parsedown->text($input); @@ -309,23 +309,15 @@ */ public function test($path = '500') { + +/* $fileFromId = 'aaron.otman-at-definitio.org.jpg'; + $x = Storage::disk('s3')->get($fileFromId);*/ - $fileFromId = 'aaron.otman-at-definitio.org.jpg'; - - $x = Storage::disk('s3')->get($fileFromId); - - return response($x) - ->withHeaders([ - 'Content-Type' => 'image/jpeg', - ]); - - // $x = Storage::disk('s3')->get('editor-at-definitio.org.jpg'); - -/* + return \View::make('test', [ 'request' => \Request::route()->uri - ]);*/ + ]); } diff --git a/database/migrations/2019_03_03_132702_definitions_populate_content_fields.php b/database/migrations/2019_03_03_132702_definitions_populate_content_fields.php new file mode 100644 index 00000000..acbf70d2 --- /dev/null +++ b/database/migrations/2019_03_03_132702_definitions_populate_content_fields.php @@ -0,0 +1,57 @@ + $def) { + echo 'Doing '; + echo $def->id; + echo ' '; + echo $def->heading; + echo "...\n"; + + $def->content_markdown = $def->body; + if (!null==$def->body) { + echo "Converting MD to HTML\n"; + $def->content_html = DefinitioSiteController::parseDom($def->body); + } else { + echo "NOT Converting MD to HTML\n"; + } + $def->save(); + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + $definitions = \App\Definition::all(); + foreach ($definitions as $i => $def) { + echo "Undoing "; + + echo $def->id; + echo ' '; + echo $def->heading; + echo '...\n'; + $def->content_html = ''; + $def->content_markdown = ''; + $def->save(); + } + } + } diff --git a/resources/views/admin/term_edit.blade.php b/resources/views/admin/term_edit.blade.php index 55dd2092..9077a657 100644 --- a/resources/views/admin/term_edit.blade.php +++ b/resources/views/admin/term_edit.blade.php @@ -2,33 +2,31 @@ @section('beef')
-
+

{{$term->expression}} - term_edit v0.1.2

+ @csrf -
-
- -
+
+ @if($errors->has('expression'))

The field "expression" is required

@endif
- -
-
-
- {!! $term->classic!!} -
+ +
+
+ {!! $term->classic!!}
- - -
-
- - -
-
- - {{Date('jS M Y', strtotime($term->published_at))}} - + + -
- - {{--------------------------- META ---------------------------}} -
-
- - - - +
+ @foreach($term->definitions as $i=>$definition) +
+ @if($errors->has('definition_heading')) +

The title is required

+ @endif
-
-
-
- - +
+ {!! $definition->content_html!!}
+ + + @endforeach +
+ Add
- {{--------------------------- /META ---------------------------}} -
-
- - - -
+ +
+
+ + + +
@if($method=='PUT') @@ -159,18 +194,18 @@ opacity: 1 }); @else - @if(Session::has('message')) - bulmaToast.toast({ - message: '{{Session::get('message')}}', - duration: 2000, - type: "is-success", - position: "top-right", - closeOnClick: true, - dismissible: true, - pauseOnHover: true, - opacity: 1 - }); - @endif + @if(Session::has('message')) + bulmaToast.toast({ + message: '{{Session::get('message')}}', + duration: 2000, + type: "is-success", + position: "top-right", + closeOnClick: true, + dismissible: true, + pauseOnHover: true, + opacity: 1 + }); + @endif @endif ClassicEditor @@ -178,7 +213,7 @@ extracPlugins: 'html5video', image: { // You need to configure the image toolbar, too, so it uses the new style buttons. - toolbar: [ 'imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight' ], + toolbar: ['imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight'], styles: [ // This option is equal to a situation where no style is applied. @@ -242,6 +277,31 @@ console.error(error); }); + // ----------------------------------------------------------------------------------------------------------- + @foreach($term->definitions as $i=>$definition) + ClassicEditor + .create(document.querySelector('#definition_edit_container_{{$definition->id}}'), { + extracPlugins: 'html5video', + image: { + toolbar: ['imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight'], + styles: ['full', 'alignLeft', 'alignRight'] + } + } + ) + .then(editor => { + window.editor = editor; + editor.model.document.on('change:data', (eventInfo, batch) => { + $('#definition_text_{{$definition->id}}').val(editor.getData()); + }); + editor.ui.focusTracker.on('change:isFocused', (evt, name, value) => { + }); + }) + .catch(error => { + console.error(error); + }); + // ----------------------------------------------------------------------------------------------------------- + @endforeach + let l = ClassicEditor.builtinPlugins.map(plugin => plugin.pluginName); console.log(l); @@ -269,7 +329,6 @@ }); } - $('#toggleCalendar').on('click', function () { $('#published_at').toggleClass('is-hidden'); }); @@ -298,8 +357,6 @@ div.append(mother); $('#app').hide(); $("body").prepend(div); - - //div.prepend($('#content_edit_container')); } ); diff --git a/resources/views/admin/term_edit_2.blade.php b/resources/views/admin/term_edit_2.blade.php new file mode 100644 index 00000000..aa3a1f30 --- /dev/null +++ b/resources/views/admin/term_edit_2.blade.php @@ -0,0 +1,368 @@ +@extends('layouts.app') +@section('beef') +
+
+

{{$term->expression}} - term_edit v0.1.2

+
+ @csrf +
+ + @if($errors->has('expression')) +

The field "expression" is required

+ @endif +
+ + +
+
+ {!! $term->classic!!} +
+
+ + + + +
+ @foreach($term->definitions as $i=>$definition) +
+ + @if($errors->has('definition_heading')) +

The title is required

+ @endif +
+
+ {!! $definition->content_html!!} +
+ + + @endforeach + + Add + + +
+
+
+ + + +
+
+
+ @if($method=='PUT') +
+ @csrf + @if(null == $term->deleted_at) + + @else + + @endif +
+ @endif +
+
+ +@stop diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 4a10690b..82160abc 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -14,6 +14,8 @@ + + diff --git a/resources/views/test.blade.php b/resources/views/test.blade.php index 3c6b8c2f..8828df42 100644 --- a/resources/views/test.blade.php +++ b/resources/views/test.blade.php @@ -4,13 +4,65 @@
-
-
+
+
+
+ Start +
+ +
+
+ +
+ +
+

+ Definition +

+

+

+ Lorem Ipsum is simply dummy text of the printing and typesetting industry. + Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown + printer took a galley of type and scrambled it to make a type specimen book. + It has survived not only five centuries, but also the leap into electronic typesetting, remaining + essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets + containing Lorem Ipsum passages, and more recently with desktop publishing software like + Aldus PageMaker including versions of Lorem Ipsum. +
+

+
+
+
+
+ +
+
+

+ Petros Diveris, Feb. 27 +

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce malesuada velit ultricies purus porta + ultricies. Donec eu magna maximus, viverra enim at, viverra leo. Fusce dignissim elit at turpis + bibendum auctor. Praesent placerat, neque ac vestibulum ultricies, augue nisi hendrerit neque, + blandit vestibulum lectus tellus vitae massa. Donec varius quam ac dolor cursus aliquam. + Quisque tellus ligula, elementum egestas dignissim vitae, gravida vitae nisi. +

+
+
+
+ End +
+ +
+

Kolumn #2

+
+

Nice work

+
-- GitLab From 11a9e1cb50201e6f90500c810924db1a5c12053c Mon Sep 17 00:00:00 2001 From: Petros Diveris Date: Sun, 3 Mar 2019 19:02:44 +0000 Subject: [PATCH 5/7] Added variable bottom margin - I want the 'bottom' bit to become a variable [b, t, l, r] i.e. class = u-mb-10 or u-pl-15 for margin bottom and padding left respectively. Not sure how this works in scss but it shouldn't be that hard. --- resources/sass/app.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/resources/sass/app.scss b/resources/sass/app.scss index cc2eaf3f..e62c137b 100644 --- a/resources/sass/app.scss +++ b/resources/sass/app.scss @@ -28,6 +28,15 @@ $positions: ('top','left','bottom','right'); } } +@each $size in $sizes { + .u-mb-#{$size} { + margin-bottom: $size + px; + } + .u-pb-#{$size} { + padding-bottom: $size + px; + } +} + .avant { font-family: 'tex_gyre_adventorregular', Arial, sans-serif !important; } -- GitLab From 28f63290a01c7edfbded566404bb87b2195900d6 Mon Sep 17 00:00:00 2001 From: Petros Diveris Date: Sun, 3 Mar 2019 21:30:13 +0000 Subject: [PATCH 6/7] Fixed the butchered main content issue arising from the wrong moustache in the blade. --- .../DefinitioContentController.php | 43 ++++++++++++++-- resources/views/admin/term_edit.blade.php | 49 +++++++++++-------- 2 files changed, 67 insertions(+), 25 deletions(-) diff --git a/app/Http/Controllers/DefinitioContentController.php b/app/Http/Controllers/DefinitioContentController.php index 361e3853..8f09bed2 100644 --- a/app/Http/Controllers/DefinitioContentController.php +++ b/app/Http/Controllers/DefinitioContentController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers; + use App\Definition; use Illuminate\Http\Request; use Illuminate\Support\Facades\Input; use ParsedownExtra; @@ -173,7 +174,6 @@ // $converter = new HtmlConverter(); $term->classic = $request->input('classic'); - // convert $term->classic = str_replace( '', @@ -189,7 +189,35 @@ if ($request->input('link_href') !== '') $term->src = '[' . $request->input('link_label') . '](' . $request->input('link_href') . ')'; - $term->save(); + try { //verticalismus. shift defs out in separate function, perhaps in the model (item) itself + // $term->save(); + + // save definitions + $keys = $request->keys(); + foreach ($keys as $key) { + if (strpos($key, 'definition_heading') === 0) { + $id = substr($key, strrpos($key, '_') + 1); + $bodyField = "definition_text_$id"; + if (intval($id) > 0 ) { + if (! in_array($bodyField, $keys)) { + abort('500', "The corresponding body isn't there for this definition"); + } + + $definition = Definition::find($id); + $definition->heading = $request->$key; + $definition->content_html = $request->$bodyField; + try { + $definition->save(); + } catch (\Exception $e) { + abort('500', "Problems encountered trying to save definition #$id"); + } + } + } + } + + } catch (\Exception $exception) { + abort(500, $exception->getMessage()); + } if ($request->input('goPreview') == 'preview') { return redirect('/term/' . $term->slug) @@ -313,7 +341,10 @@ return $this->putTerm($request, $id); } } - + + /** + * @param $d + */ public static function publishedAsString($d) { @@ -323,7 +354,11 @@ { dd('tag'); } - + + /** + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Contracts\View\View + */ public function tags(Request $request) { $q = Input::get('q', ''); diff --git a/resources/views/admin/term_edit.blade.php b/resources/views/admin/term_edit.blade.php index 9077a657..8a449b30 100644 --- a/resources/views/admin/term_edit.blade.php +++ b/resources/views/admin/term_edit.blade.php @@ -2,7 +2,7 @@ @section('beef')
-

{{$term->expression}} - term_edit v0.1.2

+

{{$term->expression}}

@csrf
@@ -35,7 +35,7 @@ type="hidden" name="classic" id="classic" - value="{!! $term->classic!!}" + value="{{ $term->classic }}" />
@@ -112,27 +112,30 @@
+ @foreach($term->definitions as $i=>$definition) -
- - @if($errors->has('definition_heading')) -

The title is required

- @endif -
-
#{{$i+1}} +
+ + @if($errors->has('definition_heading')) +

The title is required

+ @endif +
+
- {!! $definition->content_html!!} -
+ {!! $definition->content_html!!} +
+
+   +
@endforeach + +
Add
-- GitLab From 7a3e73d1abd37810a1204fa70dae716a1bee8a80 Mon Sep 17 00:00:00 2001 From: Petros Diveris Date: Sun, 3 Mar 2019 22:19:28 +0000 Subject: [PATCH 7/7] Main work done on definitions edit functions Closed #98 - Split content markdown/html in definitions and decide upon which one to use (html) Closed #97 - Timeline and edit controls. A visual time will not be added but the rest has been implemented. Closed #96 - Loosing content upon various actions. The issue was not related to fullscreen but to htmlencoding of the content to be edited (quotes) due to the wrong tags used in the blade template. --- app/Helpers/Utils.php | 4 ++-- app/Http/Controllers/DefinitioSiteController.php | 9 +++++---- composer.json | 1 + config/filesystems.php | 12 ++++++++++++ 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/app/Helpers/Utils.php b/app/Helpers/Utils.php index d5a5d2f6..36019f62 100644 --- a/app/Helpers/Utils.php +++ b/app/Helpers/Utils.php @@ -83,8 +83,8 @@ } /** - * Get an avatar either from our local Avatar store or, in the absence of one Gravatar - * What does Gravatar if ID is not resolved? + * Get an avatar either from our local avatar store or, in the absence of one Gravatar + * Update: sftp driver added * * @param string $email * @param int $size diff --git a/app/Http/Controllers/DefinitioSiteController.php b/app/Http/Controllers/DefinitioSiteController.php index 74e64eb2..e5913e17 100644 --- a/app/Http/Controllers/DefinitioSiteController.php +++ b/app/Http/Controllers/DefinitioSiteController.php @@ -310,14 +310,15 @@ public function test($path = '500') { -/* $fileFromId = 'aaron.otman-at-definitio.org.jpg'; - $x = Storage::disk('s3')->get($fileFromId);*/ + $fileFromId = 'editor-at-definitio.org.jpg'; + $x = Storage::disk('sftp')->get($fileFromId); + return response($x)->withHeaders(['Content-Type' => 'image/jpeg'] ); - return \View::make('test', +/* return \View::make('test', [ 'request' => \Request::route()->uri - ]); + ]);*/ } diff --git a/composer.json b/composer.json index ae4fd88d..eedd5b6e 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,7 @@ "laravel/tinker": "^1.0", "league/flysystem-aws-s3-v3": "^1.0", "league/flysystem-cached-adapter": "^1.0", + "league/flysystem-sftp": "^1.0", "madeitbelgium/laravel-email-domain-validation": "^1.0", "pixel418/markdownify": "^2.3", "pmatseykanets/laravel-sql-migrations": "^0.3.0", diff --git a/config/filesystems.php b/config/filesystems.php index 5e5de74a..5e785d41 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -55,6 +55,17 @@ return [ 'visibility' => 'public', ], + 'sftp' => [ + 'driver' => 'sftp', + 'host' => 'vault.definitio.org', + 'port' => 22, + 'username' => env('SFTP_UID'), + 'password' => env('SFTP_PASS'), +/* 'privateKey' => 'path/to/or/contents/of/privatekey',*/ + 'root' => '/home/apache/streams/data/avatars', + 'timeout' => 10, + ], + 's3' => [ 'driver' => 's3', 'key' => env('MINIO_KEY'), @@ -67,6 +78,7 @@ return [ 'override_visibility_on_copy' => 'private', ] ], + ], -- GitLab