diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index 0704b84f..7380d7b5 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -6,6 +6,7 @@ use Exception;
use Illuminate\Validation\ValidationException;
use Illuminate\Session\TokenMismatchException;
use Illuminate\Auth\Access\AuthorizationException;
+use Symfony\Component\Debug\Exception\FlattenException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
@@ -78,10 +79,11 @@ class Handler extends ExceptionHandler
});
$whoops->pushHandler($handler);
+ $flattened = FlattenException::create($exc);
return new \Illuminate\Http\Response(
$whoops->handleException($exc),
- $exc->getStatusCode(),
- $exc->getHeaders()
+ $flattened->getStatusCode(),
+ $flattened->getHeaders()
);
}
}
diff --git a/app/Http/Controllers/NotesAdminController.php b/app/Http/Controllers/NotesAdminController.php
index 6fd48096..ca4c3741 100644
--- a/app/Http/Controllers/NotesAdminController.php
+++ b/app/Http/Controllers/NotesAdminController.php
@@ -9,6 +9,12 @@ use App\Services\NoteService;
class NotesAdminController extends Controller
{
+ protected $noteService;
+
+ public function __construct(NoteService $noteService = null)
+ {
+ $this->noteService = $noteService ?? new NoteService();
+ }
/**
* Show the form to make a new note.
*
diff --git a/app/Jobs/SendWebMentions.php b/app/Jobs/SendWebMentions.php
index fb80d69e..3052247a 100644
--- a/app/Jobs/SendWebMentions.php
+++ b/app/Jobs/SendWebMentions.php
@@ -22,7 +22,7 @@ class SendWebMentions extends Job implements ShouldQueue
* @param Note $note
* @return void
*/
- public function __construct(Note $note, Client $guzzle)
+ public function __construct(Note $note, Client $guzzle = null)
{
$this->note = $note;
$this->guzzle = $guzzle ?? new Client();
@@ -47,7 +47,7 @@ class SendWebMentions extends Job implements ShouldQueue
'source' => $this->note->longurl,
'target' => $url
]
- ])
+ ]);
}
}
}
diff --git a/app/Services/NoteService.php b/app/Services/NoteService.php
index c9279533..a1c36905 100644
--- a/app/Services/NoteService.php
+++ b/app/Services/NoteService.php
@@ -5,7 +5,7 @@ namespace App\Services;
use App\Note;
use App\Place;
use Illuminate\Http\Request;
-use App\Jobs\SendWebmentions;
+use App\Jobs\SendWebMentions;
use App\Jobs\SyndicateToTwitter;
use Illuminate\Foundation\Bus\DispatchesJobs;
use App\Http\Controllers\WebMentionsController;
@@ -46,7 +46,7 @@ class NoteService
}
}
- $this->dispatch(new SendWebmentions($note));
+ $this->dispatch(new SendWebMentions($note));
if (//micropub request, syndication sent as array
(is_array($request->input('mp-syndicate-to'))
diff --git a/resources/views/templates/new-note-form.blade.php b/resources/views/templates/new-note-form.blade.php
index e0c55ca2..310159ee 100644
--- a/resources/views/templates/new-note-form.blade.php
+++ b/resources/views/templates/new-note-form.blade.php
@@ -4,7 +4,6 @@
-
@if ($micropub === true)
@if($syndication)