public function __construct(CommentRepository $comment) { $this->comment = $comment; $this->middleware('auth', ['only' => ['index', 'destroy']]); }