]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Repos/BaseRepo.php
Fixed occurances of altered titles in search results
[bookstack] / app / Entities / Repos / BaseRepo.php
index 8b2e70074fe09a3b95c8688b81061f90fef2760c..5699185031b12129de12f622c375f4a48980b4ac 100644 (file)
@@ -2,24 +2,18 @@
 
 namespace BookStack\Entities\Repos;
 
-use BookStack\Actions\ActivityType;
 use BookStack\Actions\TagRepo;
-use BookStack\Auth\User;
 use BookStack\Entities\Models\Entity;
 use BookStack\Entities\Models\HasCoverImage;
 use BookStack\Exceptions\ImageUploadException;
-use BookStack\Facades\Activity;
 use BookStack\Uploads\ImageRepo;
 use Illuminate\Http\UploadedFile;
-use Illuminate\Support\Collection;
 
 class BaseRepo
 {
-
     protected $tagRepo;
     protected $imageRepo;
 
-
     public function __construct(TagRepo $tagRepo, ImageRepo $imageRepo)
     {
         $this->tagRepo = $tagRepo;
@@ -27,7 +21,7 @@ class BaseRepo
     }
 
     /**
-     * Create a new entity in the system
+     * Create a new entity in the system.
      */
     public function create(Entity $entity, array $input)
     {
@@ -35,7 +29,7 @@ class BaseRepo
         $entity->forceFill([
             'created_by' => user()->id,
             'updated_by' => user()->id,
-            'owned_by' => user()->id,
+            'owned_by'   => user()->id,
         ]);
         $entity->refreshSlug();
         $entity->save();
@@ -72,6 +66,7 @@ class BaseRepo
 
     /**
      * Update the given items' cover image, or clear it.
+     *
      * @throws ImageUploadException
      * @throws \Exception
      */