Added comments controller, model, repo, and the database schema. Modified existing Page model to associate with comments.

This commit is contained in:
Abijeet
2017-01-13 21:45:48 +05:30
parent cd6572b61a
commit 397db04428
8 changed files with 143 additions and 2 deletions

View File

@ -113,6 +113,13 @@ Route::group(['middleware' => 'auth'], function () {
Route::get('/ajax/search/entities', 'SearchController@searchEntitiesAjax');
// Comments
Route::post('/ajax/page/{pageId}/comment/', 'CommentController@add');
Route::put('/ajax/page/comment/{id}', 'CommentController@update');
Route::delete('/ajax/comment/{id}', 'CommentController@destroy');
Route::get('/ajax/page/{pageId}/comment/', 'CommentController@getLastXComments');
Route::get('/ajax/page/{pageId}/comment/{id}/sub-comments', 'CommentController@getChildComments');
// Links
Route::get('/link/{id}', 'PageController@redirectFromLink');