123456789101112131415161718192021222324252627 |
- <?php
- namespace App\Http\Controllers;
- use Illuminate\Http\Request;
- use App\Models\Comment;
- class CommentController extends Controller
- {
- function moderation() {
- $comments = Comment::with("commentable")->pending()->recent()->get();
- return view("comment_moderation_queue", ["comments" => $comments]);
- }
- function allow(Comment $comment) {
- $comment->allow();
- return view("success");
- }
- function reject(Comment $comment) {
- $comment->reject();
- return view("success");
- }
- }
|