Skip to main content
2 of 2
edited body
Devidas
  • 3.4k
  • 1
  • 28
  • 63
<?php

namespace Vendor\Faq\Block\Faq;

use Magento\Framework\App\RequestInterface;
use Vendor\Faq\Block\BaseBlock;
use Vendor\Faq\Model\ResourceModel\Custom\CollectionFactory;

class Index extends \Magento\Framework\View\Element\Template 
{
    protected $mymodulemodelFactory;
    protected $request;

    public function __construct(
    CollectionFactory $mymodulemodelFactory,
    \Magento\Catalog\Block\Product\Context $context,
    RequestInterface $request,
    array $data = [] 
    )
    {
        parent::__construct($context, $data);
        $this->_request = $request;
        $this->mymodulemodelFactory = $mymodulemodelFactory;
    }
    public function getCollection()
    {
        $collection = $this->mymodulemodelFactory->getCollection();
        return $collection;
    }
}

Hey @Devidas I hope It's Work For you

Baharuni Asif
  • 1.3k
  • 10
  • 26