]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/AttachmentController.php
Ran a pass through image and attachment routes
[bookstack] / app / Http / Controllers / AttachmentController.php
index 56503a694fb06247f17a1f55ef3b57e9ee42ca7d..477640b0af9320a0140abe565349b9a85c4e4d1f 100644 (file)
@@ -68,6 +68,7 @@ class AttachmentController extends Controller
             'file' => 'required|file',
         ]);
 
+        /** @var Attachment $attachment */
         $attachment = Attachment::query()->findOrFail($attachmentId);
         $this->checkOwnablePermission('view', $attachment->page);
         $this->checkOwnablePermission('page-update', $attachment->page);
@@ -86,11 +87,10 @@ class AttachmentController extends Controller
 
     /**
      * Get the update form for an attachment.
-     *
-     * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
      */
     public function getUpdateForm(string $attachmentId)
     {
+        /** @var Attachment $attachment */
         $attachment = Attachment::query()->findOrFail($attachmentId);
 
         $this->checkOwnablePermission('page-update', $attachment->page);
@@ -173,6 +173,7 @@ class AttachmentController extends Controller
 
     /**
      * Get the attachments for a specific page.
+     * @throws NotFoundException
      */
     public function listForPage(int $pageId)
     {