App\Repositories\CommentRepository::getById PHP 메소드

getById() 공개 메소드

Get comment by given id.
public getById ( $id ) : mixed
$id
리턴 mixed
    public function getById($id)
    {
        return $this->model->find($id);
    }

Usage Example

예제 #1
0
 public function getUpdate($id)
 {
     $comment = $this->commentRepository->getById($id);
     return view('weyi.comment.update', compact('comment'));
 }