public function __construct(PostRepository $blog, CommentRepository $comment) { $this->blog = $blog; $this->comment = $comment; $this->middleware('auth', ['only' => ['create', 'store', 'update', 'edit', 'destroy']]); }