mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-21 15:36:58 +00:00
Organised activity types and moved most to repos
Repos are generally better since otherwise we end up duplicating things between front-end and API. Types moved to by CONST values within a class for better visibilty of usage and listing of types.
This commit is contained in:
parent
4824ef2760
commit
c157dc3490
19 changed files with 76 additions and 73 deletions
app/Http/Controllers
|
@ -1,6 +1,7 @@
|
|||
<?php namespace BookStack\Http\Controllers;
|
||||
|
||||
use Activity;
|
||||
use BookStack\Actions\ActivityType;
|
||||
use BookStack\Actions\CommentRepo;
|
||||
use BookStack\Entities\Page;
|
||||
use Illuminate\Http\Request;
|
||||
|
@ -40,7 +41,6 @@ class CommentController extends Controller
|
|||
// Create a new comment.
|
||||
$this->checkPermission('comment-create-all');
|
||||
$comment = $this->commentRepo->create($page, $request->get('text'), $request->get('parent_id'));
|
||||
Activity::add($page, 'commented_on', $page->book->id);
|
||||
return view('comments.comment', ['comment' => $comment]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue